chore: The docker environment is refactored

This commit is contained in:
Paramtamtam 2023-09-03 20:17:07 +04:00
parent 81570b42c0
commit 7ab0fa6f23
No known key found for this signature in database
GPG Key ID: 366371698FAD0A2B

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
# this stage is used to build the application
FROM golang:1.21-bullseye as builder
FROM golang:1.21-bullseye AS builder
COPY ./go.* /src/
@ -52,7 +52,7 @@ RUN set -x \
&& ls -l ./html
# use empty filesystem
FROM scratch as runtime
FROM scratch AS runtime
ARG APP_VERSION="undefined@docker"
@ -67,7 +67,7 @@ LABEL \
org.opencontainers.image.licenses="MIT"
# Import from builder
COPY --from=builder /tmp/rootfs /
COPY --from=compiler /tmp/rootfs /
# Use an unprivileged user
USER 10001:10001