Dockerfile: Dockerize pe-parse (#102)

Adds a default entrypoint for the dump-pe as well.
This commit is contained in:
William Woodruff 2019-12-06 13:36:08 -05:00 committed by GitHub
parent bd68ba418f
commit 2acb1fc975
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

21
Dockerfile Normal file
View File

@ -0,0 +1,21 @@
FROM alpine:latest
ARG BUILD_TYPE=Release
LABEL name "pe-parse"
LABEL src "https://github.com/trailofbits/pe-parse"
LABEL creator "Trail of Bits"
LABEL dockerfile_maintenance "William Woodruff <william@trailofbits>"
LABEL desc "Principled, lightweight C/C++ PE parser"
RUN apk add --no-cache cmake icu-dev build-base
COPY . /app/pe-parse
WORKDIR /app/pe-parse
RUN mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" .. && \
cmake --build . --config "${BUILD_TYPE}" && \
cmake --build . --config "${BUILD_TYPE}" --target install
ENTRYPOINT [ "/usr/bin/dump-pe" ]
CMD ["--help"]