Add Dockerfile and .dockerignore

Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404 2022-08-28 21:45:09 +02:00
parent cd7d7f6337
commit c3e3d46cce
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 27 additions and 0 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
Dockerfile
.dockerignore
docs
examples
Jenkinsfile
cmake-build-*

21
Dockerfile Normal file
View File

@ -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