-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrated docker file to alpine linux
- Loading branch information
Showing
2 changed files
with
12 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,26 @@ | ||
## fufluns - Copyright 2019-2021 - deroad | ||
|
||
FROM archlinux/base:latest | ||
|
||
RUN pacman -Suuyy --noconfirm python-pip wget tar unzip base-devel git meson ninja | ||
|
||
RUN mkdir -p /fufluns /tmp-build || sleep 0 | ||
FROM alpine:edge | ||
|
||
WORKDIR / | ||
RUN apk add --update py-pip wget curl tar unzip xz git bash openjdk11 android-tools alpine-sdk python3-dev | ||
RUN mkdir -p /fufluns || sleep 0 | ||
RUN pip install tornado rzpipe wheel apkid | ||
|
||
WORKDIR /tmp-build | ||
|
||
RUN chmod 777 /tmp-build | ||
|
||
RUN cp /etc/sudoers /etc/sudoers.back || sleep 0 | ||
RUN wget -q https://github.com/rizinorg/rizin/releases/download/v0.2.1/rizin-v0.2.1-static-x86_64.tar.xz -O rizin.tar.xz && tar -xvkf rizin.tar.xz && rm -rf rizin.tar.xz | ||
|
||
RUN pip wheel --wheel-dir=/tmp-build/yara-python --build-option="build" --build-option="--enable-dex" git+https://github.com/VirusTotal/[email protected] && \ | ||
pip uninstall -y yara-python && \ | ||
pip install --no-index --find-links=/tmp-build/yara-python yara-python | ||
|
||
RUN useradd builduser -m && passwd -d builduser && printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers | ||
|
||
RUN git clone --depth=1 https://github.com/rizinorg/rizin rizin-master && chown -R builduser:builduser rizin-master | ||
RUN su builduser -c 'cd /tmp-build/rizin-master && meson --prefix=/usr build && meson subprojects update && ninja -C build' | ||
RUN cd /tmp-build/rizin-master && sudo ninja -C build install && cd - && sudo rm -rf rizin-master | ||
WORKDIR /usr/local/bin | ||
RUN curl -sLO https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool && chmod +x apktool | ||
RUN curl -sL -o apktool.jar https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.5.0.jar && chmod +x apktool.jar | ||
|
||
RUN wget -q https://aur.archlinux.org/cgit/aur.git/snapshot/android-apktool.tar.gz && chmod 666 *.tar.gz | ||
RUN su builduser -c 'cd /tmp-build && tar -xvf android-apktool.tar.gz && cd android-apktool && makepkg -s --noconfirm' | ||
RUN cd /tmp-build/android-apktool && pacman -U --noconfirm *.xz && cd - && rm -rf *.tar.gz android-apktool | ||
|
||
RUN wget -q https://aur.archlinux.org/cgit/aur.git/snapshot/android-sdk-platform-tools.tar.gz && chmod 666 *.tar.gz | ||
RUN su builduser -c 'cd /tmp-build && tar -xvf android-sdk-platform-tools.tar.gz && cd android-sdk-platform-tools && makepkg -s --noconfirm' | ||
RUN cd /tmp-build/android-sdk-platform-tools && pacman -U --noconfirm *.xz && cd - && rm -rf *.tar.gz android-sdk-platform-tools | ||
|
||
## cleaning | ||
RUN userdel builduser && mv /etc/sudoers.back /etc/sudoers || sleep 0 | ||
RUN apk del alpine-sdk python3-dev wget tar git curl xz | ||
|
||
## copying fufluns | ||
WORKDIR / | ||
|
||
RUN rm -rf /tmp-build | ||
|
||
|
||
## copying fufluns | ||
COPY ./www/ /fufluns/www | ||
COPY ./android/ /fufluns/android | ||
COPY ./ios/ /fufluns/ios | ||
|
@@ -51,7 +31,7 @@ COPY ./LICENSE /fufluns/ | |
RUN chmod +x /fufluns/*.sh | ||
|
||
## creating the user and setting cmd. | ||
RUN useradd user -m && passwd -d user | ||
RUN adduser -D user | ||
|
||
EXPOSE 8080/tcp | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
|
||
SCRIPTPATH="$(cd "$(dirname "$0")"; pwd -P)" | ||
|
||
python "$SCRIPTPATH/main.py" $@ | ||
python3 "$SCRIPTPATH/main.py" $@ |