An open API service indexing awesome lists of open source software.

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.

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`