-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
28 lines (21 loc) · 864 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM golang:1.22-bullseye AS builder
WORKDIR /go/src/app
RUN apt-get update && apt-get install -y upx curl
ARG VERSION=main
ARG BUILD="N/A"
ENV GO111MODULE=on \
CGO_ENABLED=0 \
GOOS=linux
COPY . /go/src/app/
RUN go build -a -installsuffix cgo -ldflags="-w -s -X github.com/bakito/sealed-secrets-web/pkg/version.Version=${VERSION} -X github.com/bakito/sealed-secrets-web/pkg/version.Build=${BUILD}" -o sealed-secrets-web . && \
upx -q sealed-secrets-web
# application image
FROM alpine:latest
WORKDIR /opt/go
LABEL maintainer="bakito <[email protected]>" \
org.opencontainers.image.description="A web interface for Sealed Secrets by Bitnami."
EXPOSE 8080
RUN apk add --no-cache dumb-init
ENTRYPOINT ["/usr/bin/dumb-init", "--","/opt/go/sealed-secrets-web"]
COPY --from=builder /go/src/app/sealed-secrets-web /opt/go/sealed-secrets-web
USER 1001