{"id":24491416,"url":"https://github.com/vxcontrol/vxbuild-cross","last_synced_at":"2025-12-30T17:33:12.470Z","repository":{"id":86582443,"uuid":"352398913","full_name":"vxcontrol/vxbuild-cross","owner":"vxcontrol","description":"Cross compile build system to assemble vxmonitor project","archived":false,"fork":false,"pushed_at":"2024-06-25T13:32:32.000Z","size":10,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T18:18:05.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vxcontrol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-03-28T17:52:43.000Z","updated_at":"2024-08-14T08:35:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"0b9c4b84-d889-403e-9df6-4446d3a97058","html_url":"https://github.com/vxcontrol/vxbuild-cross","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vxcontrol%2Fvxbuild-cross","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vxcontrol%2Fvxbuild-cross/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vxcontrol%2Fvxbuild-cross/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vxcontrol%2Fvxbuild-cross/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vxcontrol","download_url":"https://codeload.github.com/vxcontrol/vxbuild-cross/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243673428,"owners_count":20328927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-21T18:18:08.540Z","updated_at":"2025-12-30T17:33:12.436Z","avatar_url":"https://github.com/vxcontrol.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vxbuild-cross\nCross compile build system to assemble VXMonitor project.\n\n[This repo](https://github.com/vxcontrol/vxbuild-cross) contains a Dockerfile for building an image which is used to cross compile golang. It includes the MinGW compiler for windows, and an OSX SDK via [osxcross](https://github.com/tpoechtrager/osxcross).\n\nThese images are available from https://hub.docker.com/r/vxcontrol/vxbuild-cross and is used to build.\n\n**Important**: these images was builded with OSX SDK 10.15 to make it with 10.10 or 10.11 SDKs, please, use custom builds from Building part of Readme.\n\n## Fork\nThis project based on original repository by [docker/golang-cross](https://github.com/docker/golang-cross).\n\n## Default arguments\n```Dockerfile\n# Golang docker image options\nARG GO_IMAGE=buster\nARG GO_VERSION=1.20.5\n\n# Libtool arguments\nARG LIBTOOL_VERSION=2.4.6_3\nARG LIBTOOL_SUM=9e4b12c13734a5f1b72dfd48aa71faa8fd81bbf2d16af90d1922556206caecc3\n\n# Packages repository as dependencies to build\nARG REPO_URL=https://github.com/vxcontrol/vxbuild-cross/releases/download/v0.0.0\n\n# Mac OS SDK used to osxcross\nARG OSX_SDK=MacOSX10.15.sdk\nARG OSX_SDK_SUM=d97054a0aaf60cb8e9224ec524315904f0309fbbbac763eb7736bdfbdad6efc8\n\n# osxcross arguments\nARG OSX_VERSION_MIN=10.12\nARG OSX_CODENAME=catalina\nARG OSX_CROSS_COMMIT=bee9df60f169abdbe88d8529dbcc1ec57acf656d\nARG OSX_CROSS_REQUIREMENTS=\"libssl-dev libxml2-dev zlib1g-dev\"\n```\n\n## Building\n\n### The simple way\n```bash\ndocker build -t local/vxbuild-cross:latest .\n```\n\n### Build with state cleanup\n```bash\ndocker build --no-cache -t local/vxbuild-cross:latest .\n```\n\n### Use arguments to choose golang version\n```bash\ndocker build \\\n --build-arg GO_IMAGE=\"stretch\" \\\n --build-arg GO_VERSION=\"1.17.0\" \\\n -t local/vxbuild-cross:1.17.0-stretch .\n```\n\n### Use arguments to build multi-platform images\n```bash\ndocker buildx build \\\n --platform linux/amd64,linux/arm64/v8 \\\n -t local/vxbuild-cross:multiarch .\n```\n\n### Use arguments to choose MacOS SDK 10.10\n```bash\ndocker build \\\n --build-arg LIBTOOL_VERSION=\"2.4.6_1\" \\\n --build-arg LIBTOOL_SUM=\"0eb206c0f51e8ce2e3e9340b5ce3c8ecef961ae6696f676073327a7ac04e5c0b\" \\\n --build-arg OSX_CODENAME=\"yosemite\" \\\n --build-arg OSX_CROSS_COMMIT=\"ee54d9fd43b45947ee74c99282b360cd27a8f1cb\" \\\n --build-arg OSX_CROSS_REQUIREMENTS=\"\" \\\n --build-arg OSX_VERSION_MIN=\"10.10\" \\\n --build-arg OSX_SDK=\"MacOSX10.10.sdk\" \\\n --build-arg OSX_SDK_SUM=\"631b4144c6bf75bf7a4d480d685a9b5bda10ee8d03dbf0db829391e2ef858789\" \\\n -t local/vxbuild-cross:10.10-sdk .\n```\n\n### Use arguments to choose MacOS SDK 10.11\n```bash\ndocker build \\\n --build-arg LIBTOOL_VERSION=\"2.4.6_1\" \\\n --build-arg LIBTOOL_SUM=\"b7651d0a082e2f103f03ca3a5ed831e2ff5655ccc1044ac0452e4d1825475a35\" \\\n --build-arg OSX_CODENAME=\"el_capitan\" \\\n --build-arg OSX_CROSS_COMMIT=\"ee54d9fd43b45947ee74c99282b360cd27a8f1cb\" \\\n --build-arg OSX_CROSS_REQUIREMENTS=\"\" \\\n --build-arg OSX_VERSION_MIN=\"10.11\" \\\n --build-arg OSX_SDK=\"MacOSX10.11.sdk\" \\\n --build-arg OSX_SDK_SUM=\"98cdd56e0f6c1f9e1af25e11dd93d2e7d306a4aa50430a2bc6bc083ac67efbb8\" \\\n -t local/vxbuild-cross:10.10-sdk .\n```\n\n### Use arguments to choose MacOS SDK 10.15 (by default)\n```bash\ndocker build \\\n --build-arg LIBTOOL_VERSION=\"2.4.6_3\" \\\n --build-arg LIBTOOL_SUM=\"9e4b12c13734a5f1b72dfd48aa71faa8fd81bbf2d16af90d1922556206caecc3\" \\\n --build-arg OSX_CODENAME=\"catalina\" \\\n --build-arg OSX_CROSS_COMMIT=\"bee9df60f169abdbe88d8529dbcc1ec57acf656d\" \\\n --build-arg OSX_CROSS_REQUIREMENTS=\"libssl-dev libxml2-dev zlib1g-dev\" \\\n --build-arg OSX_VERSION_MIN=\"10.12\" \\\n --build-arg OSX_SDK=\"MacOSX10.15.sdk\" \\\n --build-arg OSX_SDK_SUM=\"d97054a0aaf60cb8e9224ec524315904f0309fbbbac763eb7736bdfbdad6efc8\" \\\n -t local/vxbuild-cross:10.15-sdk .\n```\n\n## Using\n\n### Check golang version\n\n* `docker run --rm vxcontrol/vxbuild-cross go version`\n\n### Simple attach to container\n\n* `docker run --rm -it vxcontrol/vxbuild-cross /bin/bash`\n* `docker run --rm -v /host/gopath:/go -it vxcontrol/vxbuild-cross /bin/bash`\n\n### Cross compile simple Go project (docker container inside)\n\n* `GOOS=linux GOARCH=amd64 go build`\n* `GOOS=linux GOARCH=386 go build`\n* `GOOS=darwin GOARCH=amd64 go build`\n* `GOOS=darwin GOARCH=386 go build`\n* `GOOS=windows GOARCH=amd64 go build`\n* `GOOS=windows GOARCH=386 go build`\n\n### Cross compile Go project with cgo on linux/amd64 (docker container inside)\n\n* `GOOS=linux GOARCH=amd64 CC=gcc CXX=g++ CGO_ENABLED=1 go build`\n* `GOOS=linux GOARCH=386 CC=gcc CXX=g++ CGO_ENABLED=1 go build`\n* `GOOS=darwin GOARCH=amd64 CC=o64-clang CXX=o64-clang++ CGO_ENABLED=1 go build`\n* `GOOS=darwin GOARCH=386 CC=o32-clang CXX=o32-clang++ CGO_ENABLED=1 go build`\n* `GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_ENABLED=1 go build`\n* `GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ CGO_ENABLED=1 go build`\n\n### Cross compile Go project with cgo on linux/arm64 (docker container inside)\n\n* `GOOS=linux GOARCH=amd64 CC=x86_64-linux-gnu-gcc CXX=x86_64-linux-gnu-g++ CGO_ENABLED=1 go build`\n* `GOOS=linux GOARCH=386 CC=i686-linux-gnu-gcc CXX=i686-linux-gnu-g++ CGO_ENABLED=1 go build`\n* `GOOS=darwin GOARCH=amd64 CC=o64-clang CXX=o64-clang++ CGO_ENABLED=1 go build`\n* `GOOS=darwin GOARCH=386 CC=o32-clang CXX=o32-clang++ CGO_ENABLED=1 go build`\n* `GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_ENABLED=1 go build`\n* `GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ CGO_ENABLED=1 go build`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvxcontrol%2Fvxbuild-cross","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvxcontrol%2Fvxbuild-cross","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvxcontrol%2Fvxbuild-cross/lists"}