Remove additional apk update, in Dockerfile (#1079)

This commit is contained in:
Peter Dave Hello 2021-12-14 17:58:22 +08:00 committed by GitHub
parent 44d701a9dd
commit 121dcd79ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ FROM golang:${GOVERSION}-alpine AS build
WORKDIR /go/src/crowdsec
# wizard.sh requires GNU coreutils
RUN apk update && apk add --no-cache git jq gcc libc-dev make bash gettext binutils-gold coreutils
RUN apk add --no-cache git jq gcc libc-dev make bash gettext binutils-gold coreutils
COPY . .
@ -13,7 +13,7 @@ RUN SYSTEM="docker" make release
RUN cd crowdsec-v* && ./wizard.sh --docker-mode && cd -
RUN cscli hub update && cscli collections install crowdsecurity/linux && cscli parsers install crowdsecurity/whitelists
FROM alpine:latest
RUN apk update --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community && apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community tzdata yq
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community tzdata yq
COPY --from=build /etc/crowdsec /etc/crowdsec
COPY --from=build /var/lib/crowdsec /var/lib/crowdsec
COPY --from=build /usr/local/bin/crowdsec /usr/local/bin/crowdsec
@ -27,4 +27,4 @@ COPY --from=build /go/src/crowdsec/plugins/notifications/slack/slack.yaml /etc/c
COPY --from=build /go/src/crowdsec/plugins/notifications/splunk/splunk.yaml /etc/crowdsec/notifications/splunk.yaml
COPY --from=build /usr/local/lib/crowdsec/plugins /usr/local/lib/crowdsec/plugins
ENTRYPOINT /bin/sh docker_start.sh
ENTRYPOINT /bin/sh docker_start.sh