-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.cicd
More file actions
41 lines (28 loc) · 1.06 KB
/
Dockerfile.cicd
File metadata and controls
41 lines (28 loc) · 1.06 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM golang:1.26-alpine AS builder
ENV GOPATH=/go
ENV CGO_ENABLED=0
ENV GO111MODULE=on
WORKDIR /go/obstor
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -trimpath -ldflags "-s -w $(go run buildscripts/gen-ldflags.go)" -o /go/bin/obstor .
FROM alpine:3.23
ARG TARGETARCH
LABEL maintainer="PGG Inc <oss@pgg.net>"
ENV OBSTOR_ACCESS_KEY_FILE=access_key \
OBSTOR_SECRET_KEY_FILE=secret_key \
OBSTOR_ROOT_USER_FILE=access_key \
OBSTOR_ROOT_PASSWORD_FILE=secret_key \
OBSTOR_KMS_SECRET_KEY_FILE=kms_master_key \
OBSTOR_UPDATE_MINISIGN_PUBKEY="RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav"
RUN apk add --no-cache curl ca-certificates su-exec
COPY --from=builder /go/bin/obstor /usr/bin/obstor
COPY --from=builder /go/obstor/CREDITS /licenses/CREDITS
COPY --from=builder /go/obstor/LICENSE /licenses/LICENSE
COPY --from=builder /go/obstor/dockerscripts/docker-entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/docker-entrypoint.sh
EXPOSE 9000
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
VOLUME ["/data"]
CMD ["obstor", "server", "/data"]