merge full and slim dockerfiles

Fixes #232
This commit is contained in:
Nicola Murino
2021-02-07 21:49:04 +01:00
parent cd4a68cc96
commit a2a99f9b57
7 changed files with 32 additions and 64 deletions

View File

@@ -28,8 +28,13 @@ RUN set -xe && \
FROM alpine:3.12
# Set to "true" to install the optional git and rsync dependencies
ARG INSTALL_OPTIONAL_PACKAGES=false
RUN apk add --update --no-cache ca-certificates tzdata mailcap
RUN if [ "${INSTALL_OPTIONAL_PACKAGES}" = "true" ]; then apk add --update --no-cache rsync git; fi
# set up nsswitch.conf for Go's "netgo" implementation
# https://github.com/gliderlabs/docker-alpine/issues/367#issuecomment-424546457
RUN test ! -e /etc/nsswitch.conf && echo 'hosts: files dns' > /etc/nsswitch.conf