-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
34 lines (23 loc) · 876 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
29
30
31
32
33
34
FROM golang:alpine AS builder
WORKDIR /build
COPY . /build/
RUN apk update && apk upgrade && apk add git && \
go get -d
ARG TAG
ARG BUILDDATE
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags "-X main.BuildVersion=$BUILDDATE -X main.GitVersion=$TAG -extldflags \"-static\"" -o main .
FROM alpine:3.19
LABEL maintainer="Andreas Peters <support@aventer.biz>"
LABEL org.opencontainers.image.title="mesos-m3s"
LABEL org.opencontainers.image.description="ClusterD/Apache Mesos container orchestrator"
LABEL org.opencontainers.image.vendor="AVENTER UG (haftungsbeschränkt)"
LABEL org.opencontainers.image.source="https://github.com/AVENTER-UG/"
RUN apk add --no-cache ca-certificates
RUN apk update
RUN apk upgrade
RUN adduser -S -D -H -h /app appuser
USER appuser
COPY --from=builder /build/main /app/
EXPOSE 10000
WORKDIR "/app"
CMD ["./main"]