Skip to content

Commit

Permalink
Dockerfile: add CAP_NET_BIND_SERVICE+eip to fabio as non root
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamilcuk authored and tristanmorgan committed Sep 4, 2024
1 parent c20a401 commit ecf7936
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ ARG vault_version=1.11.0
ADD https://releases.hashicorp.com/vault/${vault_version}/vault_${vault_version}_linux_amd64.zip /usr/local/bin
RUN cd /usr/local/bin && unzip vault_${vault_version}_linux_amd64.zip

RUN apk update && apk add --no-cache git
RUN apk update && apk add --no-cache git libcap
WORKDIR /src
COPY . .
RUN go mod tidy
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test -trimpath -ldflags "-s -w" ./...
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "-s -w"
RUN setcap cap_net_bind_service=+ep /src/fabio

FROM alpine:3.16
RUN apk update && apk add --no-cache ca-certificates
Expand Down

0 comments on commit ecf7936

Please sign in to comment.