Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Dockerfile for CGO app under balenaOS on RPi3
FROM balenalib/raspberrypi3-alpine-golang as builder
WORKDIR /go/src/rpi-server
COPY . ./
RUN apk add musl-dev linux-headers
RUN go install -a -tags netgo -ldflags '-extldflags "-static"'
FROM resin/scratch
COPY --from=builder /go/bin/rpi-server /rpi-server
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
CMD ["/rpi-server"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.