Adding Docker support
Just in case you don't want to install Golang to build the package/binary or, just like me, you like to run apps from containers here is a very simple Dockerfile.
You will need to:
- Checkout the code
- Build the image,
docker buitd -t IMAGE_NAME . - Run the container,
docker run --rm -ti IMAGE_NAME
This looks nice, thanks. I don't have much experience with docker but can't the image build check out the compiler and source automatically and delete it afterwards? For just creating an image containing golang and whatscli it seems a bit pointless to add this?
This looks nice, thanks. I don't have much experience with docker but can't the image build check out the compiler and source automatically and delete it afterwards? For just creating an image containing golang and whatscli it seems a bit pointless to add this?
Here you have a multi-stage dockerfile. make build is executed on golang stage and then the binary is copied into alpine stage.
Steps were not modified.