Tidy up previous build files

This commit is contained in:
Svilen Markov
2024-08-07 18:50:06 +01:00
parent a5728e9407
commit f9ea2d73e1
4 changed files with 9 additions and 324 deletions

View File

@@ -1,11 +1,13 @@
FROM alpine:3.20
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
FROM golang:1.22.5-alpine3.20 AS builder
WORKDIR /app
COPY build/glance-$TARGETOS-$TARGETARCH${TARGETVARIANT} /app/glance
COPY . /app
RUN CGO_ENABLED=0 go build .
FROM alpine:3.20
WORKDIR /app
COPY --from=builder /app/glance .
EXPOSE 8080/tcp
ENTRYPOINT ["/app/glance"]