Able to compile go binaries
An example workflow of using the container on Direktiv.
id: go-build
functions:
- id: go
image: direktiv/go:v1
files:
- key: helloworld
scope: instance
type: tar.gz
description: Builds a go binary from the files
states:
- id: go
type: action
action:
function: go
input:
args: ["build", "-o", "helloworldserver"]
execution-folder: helloworld
variable: helloworldserver
variable-type: instance
The input required to run the container needs a json struct like the following:
{
"args": ["build", "-o", "helloworldserver"],
"execution-folder": "helloworld",
"variable": "helloworldserver",
"variable-type": "instance"
}
The output of the binary gets saved as the variable and variable-type.
In the case that an error is encountered it will present in the following format:
{
"errorCode": "com.go.error",
"errorMsg": "Something went wrong"
}
Content type
Image
Digest
sha256:5e440d3fb…
Size
159.9 MB
Last updated
about 4 years ago
docker pull westwind027/go