Skip to content

Commit

Permalink
Merge pull request #357 from neilcook/docker
Browse files Browse the repository at this point in the history
Use debian-bullseye-slim for docker image saving over 100MB and also
  • Loading branch information
neilcook authored Dec 17, 2021
2 parents 756c7ee + 39e19b9 commit 60c34f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docker/wforce_image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:buster as wforce_build
FROM debian:bullseye-slim as wforce_build

RUN apt-get update && \
apt-get dist-upgrade -y && \
Expand Down Expand Up @@ -61,7 +61,7 @@ RUN ./configure --prefix /usr --enable-trackalert --disable-systemd --disable-do
RUN make clean
RUN make install DESTDIR=/wforce/install

FROM debian:buster as wforce_image
FROM debian:bullseye-slim as wforce_image

WORKDIR /wforce/

Expand All @@ -72,18 +72,18 @@ COPY --from=wforce_build /wforce/report_api /wforce/report_api
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get -y -f install \
libboost-date-time1.67.0 \
libboost-regex1.67.0 \
libboost-system1.67.0 \
libboost-filesystem1.67.0 \
libboost-date-time1.74.0 \
libboost-regex1.74.0 \
libboost-system1.74.0 \
libboost-filesystem1.74.0 \
libcurl4 \
libgeoip1 \
libgetdns10 \
libhiredis0.14 \
libluajit-5.1-2 \
libmaxminddb0 \
libreadline7 \
libprotobuf17 \
libreadline8 \
libprotobuf23 \
libssl1.1 \
libsodium23 \
libyaml-cpp0.6 \
Expand Down
5 changes: 5 additions & 0 deletions docker/wforce_image/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ if [[ "x$TRACKALERT" == "x" ]]; then
if [[ "$WFORCE_VERBOSE" -eq "1" ]]; then
WFORCE_CMD="$WFORCE_CMD -v"
fi
# Check if they just supplied their own wforce.conf file
if [[ -f /etc/wforce/wforce.conf ]]; then
echo "Using supplied wforce config file /etc/wforce/wforce.conf"
WFORCE_CONFIG_FILE=/etc/wforce/wforce.conf
fi
if [[ "x$WFORCE_CONFIG_FILE" == "x" ]]; then
if [[ "x$WFORCE_HTTP_PASSWORD" == "x" ]]; then
2>&1 echo "WFORCE_HTTP_PASSWORD environment variable must be set"
Expand Down

0 comments on commit 60c34f8

Please sign in to comment.