-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (23 loc) · 765 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (23 loc) · 765 Bytes
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
FROM golang:1.25-alpine3.21 AS builder
ENV CGO_ENABLED=0
ENV GO111MODULE=on
RUN apk --no-cache --no-progress add --virtual \
build-deps \
build-base \
git
WORKDIR /github.com/skyoo2003/acor
COPY . .
RUN make build
FROM alpine:3.21
RUN addgroup -S -g 1000 app \
&& adduser -S -u 1000 -h /acor -G app appuser \
&& mkdir -p /acor \
&& chown appuser:app /acor
VOLUME /acor
WORKDIR /acor
COPY --from=builder --chown=appuser:app /github.com/skyoo2003/acor/dist/acor /usr/bin/acor
# Same path as Dockerfile.goreleaser, so the locally built and released images
# carry the third-party notices in the same place.
COPY --from=builder /github.com/skyoo2003/acor/LICENSE /github.com/skyoo2003/acor/NOTICE /usr/share/doc/acor/
USER appuser
ENTRYPOINT ["acor"]