From c3e3d46cce5b08a296e6277c312371ad76a628b9 Mon Sep 17 00:00:00 2001 From: Username404 Date: Sun, 28 Aug 2022 21:45:09 +0200 Subject: [PATCH] Add Dockerfile and .dockerignore Signed-off-by: Username404 --- .dockerignore | 6 ++++++ Dockerfile | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b04a8c9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +Dockerfile +.dockerignore +docs +examples +Jenkinsfile +cmake-build-* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8c04964 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM alpine:3.16.2 +RUN apk add --no-cache gcc g++ musl-dev libc-dev cmake git samurai coreutils rpm dpkg dpkg-dev xz file + +RUN mkdir -p /usr/src/yerbacon +WORKDIR /usr/src/ +RUN git clone --quiet -n --branch devel4 https://github.com/upx/upx/ +ARG CMAKE_BUILD_TYPE="Release" +WORKDIR ./upx +RUN git checkout --quiet 73377971d48e88a99f53372f6520e1eec6ec453b +RUN git submodule --quiet update --init +RUN mkdir -p ./build/release +WORKDIR ./build/release +RUN cmake -G Ninja ../.. +RUN cmake --build . --parallel `nproc` + +WORKDIR /usr/src/yerbacon +COPY . ./ +RUN cmake -G Ninja -S . -B ./cmake-build-release -DCMAKE_EXE_LINKER_FLAGS="-static" -DSELF_PACKER_FOR_EXECUTABLE=/usr/src/upx/build/release/upx +RUN cmake --build ./cmake-build-release --parallel `nproc` +WORKDIR ./cmake-build-release +RUN cpack \ No newline at end of file