bdwyertech / dkr-go-crosscompile

Docker image for cross compilation

Home Page:https://hub.docker.com/r/bdwyertech/go-crosscompile

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CGO Cross Compilation on Alpine Linux

This is an image intended for Go cross-compilation, primarily for Mac & Windows. This was created out of a need to build a system tray application for both platforms.

Usage

# Mac
export CGO_ENABLED=1
export CC=o64-clang
export CXX=o64-clang++

# Windows
export CGO_ENABLED=1
export CC=x86_64-w64-mingw32-gcc
export CXX=x86_64-w64-mingw32-g++

# Linux - ARM64
export CGO_ENABLED=1
export CC=aarch64-linux-musl-gcc
export CXX=aarch64-linux-musl-g++

About

Docker image for cross compilation

https://hub.docker.com/r/bdwyertech/go-crosscompile


Languages

Language:Dockerfile 61.1%Language:Shell 38.9%