21 lines
788 B
Docker
21 lines
788 B
Docker
|
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
|