Skip to content

Docker image for cross-compiling Go code with enabled CGO for ARM architecture

Notifications You must be signed in to change notification settings

AlexKMDev/go-docker-arm-toolchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Compiling using Docker image

docker run -it --rm \
-v "$PWD":/go/src/myrepo/mypackage -w /go/src/myrepo/mypackage \
-e GOOS=linux -e GOARCH=arm -e CGO_ENABLED=1 \
-e CC=arm-linux-gnueabihf-gcc anakros/goarm \
go build -o binary-armhf-linux

# or in one line
docker run -it --rm -v "$PWD":/go/src/myrepo/mypackage -w /go/src/myrepo/mypackage -e GOOS=linux -e GOARCH=arm -e CGO_ENABLED=1 -e CC=arm-linux-gnueabihf-gcc anakros/goarm go build -o binary-armhf-linux

About

Docker image for cross-compiling Go code with enabled CGO for ARM architecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published