Merge pull request #913 from PeterDaveHello/ImproveDockerfile

Remove `--update` and replace with `--no-cache` for `apk` in Dockerfile
This commit is contained in:
Simone Margaritelli 2021-11-29 10:43:05 +01:00 committed by GitHub
commit ed4239fad5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,8 +3,8 @@ FROM golang:alpine AS build-env
ENV SRC_DIR $GOPATH/src/github.com/bettercap/bettercap ENV SRC_DIR $GOPATH/src/github.com/bettercap/bettercap
RUN apk add --update ca-certificates RUN apk add --no-cache ca-certificates
RUN apk add --no-cache --update bash iptables wireless-tools build-base libpcap-dev libusb-dev linux-headers libnetfilter_queue-dev git RUN apk add --no-cache bash iptables wireless-tools build-base libpcap-dev libusb-dev linux-headers libnetfilter_queue-dev git
WORKDIR $SRC_DIR WORKDIR $SRC_DIR
ADD . $SRC_DIR ADD . $SRC_DIR
@ -16,8 +16,8 @@ RUN git clone https://github.com/bettercap/caplets /usr/local/share/bettercap/ca
# final stage # final stage
FROM alpine FROM alpine
RUN apk add --update ca-certificates RUN apk add --no-cache ca-certificates
RUN apk add --no-cache --update bash iproute2 libpcap libusb-dev libnetfilter_queue wireless-tools RUN apk add --no-cache bash iproute2 libpcap libusb-dev libnetfilter_queue wireless-tools
COPY --from=build-env /go/src/github.com/bettercap/bettercap/bettercap /app/ COPY --from=build-env /go/src/github.com/bettercap/bettercap/bettercap /app/
COPY --from=build-env /usr/local/share/bettercap/caplets /app/ COPY --from=build-env /usr/local/share/bettercap/caplets /app/
WORKDIR /app WORKDIR /app