From ab287a2b69b759b3a5f24e791c0c349442775716 Mon Sep 17 00:00:00 2001 From: sim1222 Date: Sat, 29 Mar 2025 21:40:32 +0900 Subject: [PATCH] fix: Dockerfile make buildable --- Dockerfile | 22 +++++++++++++++++++--- compose.yaml | 10 ++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 compose.yaml diff --git a/Dockerfile b/Dockerfile index fbe3a94..20b710f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,26 @@ +FROM ubuntu:latest AS builder + +WORKDIR /app + +RUN apt update && \ + apt install aria2 lsb-release wget software-properties-common gnupg unzip build-essential cmake -y + +RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" + +RUN aria2c -o android-ndk-r23b-linux.zip https://dl.google.com/android/repository/android-ndk-r23b-linux.zip +RUN unzip -q -d ~ android-ndk-r23b-linux.zip + +COPY . /app + +RUN mkdir /app/build && cd /app/build && cmake .. && make + FROM ubuntu:latest WORKDIR /app -#COPY --from=builder /app /app -COPY . /app +COPY --from=builder /app/rootfs/ /app/rootfs/ +COPY --from=builder /app/wrapper /app/ ENV args "" CMD ["bash", "-c", "./wrapper ${args}"] -EXPOSE 10020 20020 \ No newline at end of file +EXPOSE 10020 10020 diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..33e23fa --- /dev/null +++ b/compose.yaml @@ -0,0 +1,10 @@ +services: + wrapper: + image: sim1222/wrapper:latest + build: . + volumes: + - ./rootfs/data:/app/rootfs/data + ports: + - 10020:10020 + environment: + - args="-H 0.0.0.0"