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 stcrashreceiver && go run build.go build stcrashreceiver
FROM alpine
ARG TARGETARCH
EXPOSE 8080
COPY --from=builder /src/stcrashreceiver /bin/stcrashreceiver
COPY stcrashreceiver-linux-${TARGETARCH} /bin/stcrashreceiver
ENTRYPOINT [ "/bin/stcrashreceiver" ]