robocar-arduino/Dockerfile

19 lines
352 B
Docker
Raw Normal View History

2019-12-01 21:35:19 +00:00
FROM golang:alpine as builder
ARG GOOS=linux
ARG GOARCH=amd64
ARG GOARM=""
WORKDIR /go/src
ADD . .
RUN CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} GOARM=${GOARM} go build -mod vendor -tags netgo ./cmd/rc-arduino/
FROM gcr.io/distroless/static
USER 1234
COPY --from=builder /go/src/rc-arduino /go/bin/rc-arduino
ENTRYPOINT ["/go/bin/rc-arduino"]