FROM golang@sha256:8d48e12ec56735e9358640898b9d9b9fcca110612ed8a5567438c0a1baa24e66 AS build WORKDIR /src COPY go.mod go.sum ./ RUN go mod download COPY . . RUN CGO_ENABLED=0 go build -trimpath -o /out/shuttle ./cmd/shuttle FROM alpine@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6 LABEL shuttle.spike="green" RUN apk add --no-cache ca-certificates git \ && addgroup -g 10001 shuttle \ && adduser -D -H -u 10001 -G shuttle shuttle \ && install -d -o shuttle -g shuttle -m 0700 /data COPY --from=build /out/shuttle /usr/local/bin/shuttle USER 10001:10001 WORKDIR /data ENTRYPOINT ["shuttle"] CMD ["serve", "--addr", "0.0.0.0:8080", "--admin-addr", "127.0.0.1:8081"]