Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xlab/gobldock
gobldock provides an easy and convenient way to cross-compile Go packages for Docker (Linux x64_86) environments.
https://github.com/xlab/gobldock
Last synced: about 1 month ago
JSON representation
gobldock provides an easy and convenient way to cross-compile Go packages for Docker (Linux x64_86) environments.
- Host: GitHub
- URL: https://github.com/xlab/gobldock
- Owner: xlab
- License: mit
- Created: 2015-01-04T18:46:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-04T18:46:51.000Z (almost 10 years ago)
- Last Synced: 2024-04-16T00:14:29.501Z (7 months ago)
- Language: Go
- Size: 97.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go Build in Docker
[gobldock] provides an easy and convenient way to cross-compile Go packages for Docker (Linux x64_86) environments. Internally it does the following:
- loads a `golang` docker image with Go and GCC compilers present, so CGO is enabled;
- mounts the `$GOPATH` from the host;
- mounts the output directory (`pwd` by default) from the host;
- runs `go build -i` inside this docker image.[gobldock]: http://github.com/missionMeteora/gobldock
## Usage
Requires an installed [docker](https://docs.docker.com).
```
./gobldock -h
Usage: ./gobldock
-o, --output="." Specify the path for resulting exectuable
-s, --silent=false Be silent, no fancy stuff
```## Example
```
xlab ~/Documents/dev/meteora $ go get github.com/missionMeteora/gobldock
xlab ~/Documents/dev/meteora $ boot2docker shellinitxlab ~/Documents/dev/meteora $ gobldock github.com/missionMeteora/gobldock
found Docker: /usr/local/bin/docker
Docker version 1.3.2, build 39fa2fa
compiling into: /Users/xlab/Documents/dev/meteora/gobldockxlab ~/Documents/dev/meteora $ file gobldock
gobldock: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
```## License
[MIT](/LICENSE)