hawarden_
hawarden_

Reputation: 2170

Run go program without Go environment

I wrote a program in Go and I want to launch it in a Docker container, but my company does not have a golang Docker image and refuses to download one.

I only have an image with Java (CentOS). How can I achieve this? Is it possible to run some kind of binary thing which does not need Go environment?

Thanks in advance.

Upvotes: 1

Views: 1415

Answers (1)

ABri
ABri

Reputation: 618

You don't need docker or a go SDK environment to run go executables. Simply cross compile stackoverflow Q: 12168873 the go program on the pc you wrote it and copy the binary to the computer with CentOS, given that computer has a supported hardware.

Upvotes: 3

Related Questions