Last active
June 7, 2019 13:10
-
-
Save filipeandre/91b2167ec2f58f599cb3914b5e703fc2 to your computer and use it in GitHub Desktop.
Dockerfile to compile go app to arm-7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.12 | |
WORKDIR /go/src/app | |
RUN apt-get update && apt-get install -y \ | |
gcc-arm-linux-gnueabihf \ | |
&& rm -rf /var/lib/apt/lists/* | |
ENV CC=arm-linux-gnueabihf-gcc | |
ENV CXX=arm-linux-gnueabihf-g++ | |
ENV CGO_ENABLED=1 | |
ENV GOOS=linux | |
ENV GOARCH=arm | |
ENV GOARM=7 | |
CMD go build -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment