https://github.com/mitchs-dev/gocompiler
A Docker image which can be used to compile GO binaries for multiple OS's. This image is based on the official `golang` image.
https://github.com/mitchs-dev/gocompiler
Last synced: about 2 months ago
JSON representation
A Docker image which can be used to compile GO binaries for multiple OS's. This image is based on the official `golang` image.
- Host: GitHub
- URL: https://github.com/mitchs-dev/gocompiler
- Owner: mitchs-dev
- License: mit
- Created: 2024-12-04T00:12:45.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-04T02:25:40.000Z (6 months ago)
- Last Synced: 2025-02-10T03:46:25.175Z (3 months ago)
- Language: Shell
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gocompiler
This is a docker image which can be used to compile GO binaries for multiple OS's. This image is based on the official `golang` image.
> **IMPORTANT**: This image has previously gone through an overhaul. If you previously used a `1.0.0` version of this image, please be aware that the new tags are going to reflect the version of GO that is being used. (I.e `1.23.3`)
## Supported Versions
This image will follow the GO Release Policy and will support the last 3 minor versions of GO: https://go.dev/doc/devel/release#policy
## How to use
```bash
docker run -ti --rm -v "/app" vo1d/gocompiler:latest
```* `` - This should be the root of your GO project
* If you are currently in the root of your GO project, you can just do `$PWD` for this value
* `` - Name of the binary which is generated
* `` - Version of the binary which will be generated
* `` - OS to build binary for (Linux, Darwin, Windows)
* `` - true/false to add `-DEV` to the end of the binary name## Building with CGO enabled
The default image does not have CGO enabled. If you need to build with CGO enabled, you can add `-cgo` to the end of the tag to pull the image with CGO enabled.
Example: `vo1d/gocompiler:latest-cgo`
## Build image
You can build the image by simply running `./buildImage.sh`