-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (31 loc) · 886 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
FROM --platform=${BUILDPLATFORM:-linux/amd64} public.ecr.aws/docker/library/golang:1.20.4-alpine3.16 AS builder
ARG RELEASE_VERSION=devel
ARG TARGETOS
ARG TARGETARCH
ENV GOOS=${TARGETOS}
ENV GOARCH=${TARGETARCH}
WORKDIR /go/src/github.com/mazay/mikromanager
# hadolint ignore=DL3018
RUN apk --no-cache add git curl
COPY ./ ./
RUN go mod download
# hadolint ignore=DL3059
RUN go build
FROM public.ecr.aws/docker/library/alpine:3.20.3
ARG TARGETPLATFORM
LABEL maintainer="Yevgeniy Valeyev <[email protected]>"
# hadolint ignore=DL3018
RUN apk --no-cache add ca-certificates
# hadolint ignore=DL3059
RUN adduser \
--disabled-password \
--no-create-home \
-u 8888 \
mikromanager
USER mikromanager
WORKDIR /app/
COPY templates ./templates
COPY static ./static
COPY config.yml .
COPY --from=builder /go/src/github.com/mazay/mikromanager/mikromanager .
CMD ["./mikromanager"]