diff --git a/Dockerfile b/Dockerfile index 226ce10..271f82c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,12 @@ FROM notcompsky/static-wangle-ffmpeg-opencv:latest AS intermediate WORKDIR /bpcs COPY CMakeLists.txt /bpcs/CMakeLists.txt COPY src /bpcs/src +ARG target=linux-x64 RUN mkdir -p /usr/local/include/compsky/macros \ && curl -sL https://raw.githubusercontent.com/NotCompsky/libcompsky/master/include/compsky/macros/likely.hpp > /usr/local/include/compsky/macros/likely.hpp \ \ && mkdir /bpcs/build \ + && mkdir /bpcs-bin \ && for buildtype in Release Debug RelWithDebInfo MinSizeRel; do \ ( mkdir "/bpcs/build/$buildtype" \ && cd "/bpcs/build/$buildtype" \ @@ -24,9 +26,13 @@ RUN mkdir -p /usr/local/include/compsky/macros \ && ls -l bpcs* \ && strip -s bpcs* \ && ls -l bpcs* \ + && sha1sum bpcs* \ + && for f in bpcs bpcs-x bpcs-count bpcs-fmt; do \ + mv "$f" "/bpcs-bin/${target}_${buildtype}_${f}"; \ + done \ ); done FROM alpine:latest WORKDIR /bpcs -COPY --from=intermediate /bpcs/build /bpcs/ +COPY --from=intermediate /bpcs-bin/* /bpcs/ ENTRYPOINT [ "/bin/sh" ]