build: Build infrastructure images

This commit is contained in:
Jakob Borg
2023-07-01 07:53:04 +02:00
parent 229b6a292c
commit 5a1f996e56
4 changed files with 61 additions and 37 deletions

View File

@@ -1,18 +1,8 @@
ARG GOVERSION=latest
FROM golang:$GOVERSION AS builder
WORKDIR /src
COPY . .
ENV CGO_ENABLED=0
ENV BUILD_HOST=syncthing.net
ENV BUILD_USER=docker
RUN rm -f stupgrades && go run build.go build stupgrades
FROM alpine
ARG TARGETARCH
EXPOSE 8080
COPY --from=builder /src/stupgrades /bin/stupgrades
COPY stupgrades-linux-${TARGETARCH} /bin/stupgrades
ENTRYPOINT [ "/bin/stupgrades" ]