This commit is contained in:
1 parent
b48afc7881
commit
7ba25bd997
12 files changed
+45
-166
No files matched your search
+2
-9
@@ -10,12 +10,5 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g
|
||||
&& go vet ./... \
|
||||
&& go build -trimpath -ldflags='-s -w' -o /out/demo .
|
||||
|
||||
FROM scratch AS runtime
|
||||
ARG SOURCE_REVISION
|
||||
LABEL org.opencontainers.image.source="https://git.dever.cc/rabin/demo" \
|
||||
org.opencontainers.image.revision=$SOURCE_REVISION
|
||||
COPY --from=build /out/demo /demo
|
||||
USER 65532:65532
|
||||
ENV PORT=8080
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/demo"]
|
||||
FROM scratch AS artifact
|
||||
COPY --from=build /out/demo /app
|
||||
Reference in new issue
Block a user