https://github.com/lubyruffy/gocross
golang cross compiler, support windows/linux/darwin/mips/arm, with goreleaser, support CGO
https://github.com/lubyruffy/gocross
Last synced: 2 months ago
JSON representation
golang cross compiler, support windows/linux/darwin/mips/arm, with goreleaser, support CGO
- Host: GitHub
- URL: https://github.com/lubyruffy/gocross
- Owner: LubyRuffy
- Created: 2022-05-14T14:43:50.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-16T12:33:00.000Z (about 3 years ago)
- Last Synced: 2025-01-28T05:44:09.671Z (4 months ago)
- Language: Dockerfile
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gocross
golang cross compiler, support windows/linux/darwin/mips/arm, with goreleaser, support CGO## Versions
If not necessary, latest version doesn't mean it's good for you. You should conside stability, compatibility and image size.
### v1.0
| Package | Version |
| ----------- | ----------- |
| OS Version | Debian bullseye |
| goreleaser | 1.8.3 |
| golang | 1.18.2-0 |
| osx-sdk | 11.1 |
| gcc | 10 |
### v0.1
| Package | Version |
| ----------- | ----------- |
| OS Version | Debian buster |
| goreleaser | 1.7.0 |
| golang | 1.17.9-0 |
| osx-sdk | 11.1 |
| gcc | 8 |## How to use
Pull:
```
docker pull lubyruffy/gocross
```
Goreleaser:
```
docker run -it --rm -v $GOPATH:/go -w /go/src/github.com/org/repo/ lubyruffy/gocross "goreleaser build --snapshot --rm-dist"
```Go build in Windows:
```
docker run -it --rm -v $env:GOPATH\:/go -w /go/src/github.com/org/repo lubyruffy/gocross "go build"
```## Some tips
- If you want to use libpcap link static, such as go build with ldflags like '-extldflags "-static"', then you'd better use v0.1 system inner apt libpcap-dev directly, or manually compile with --enable-dbus=no in v1 cause libpcap use dynamic dbus.