Sign inSign up

kengibson1111/godev

By kengibson1111

Updated about 1 year ago

Used for Go development and anything kengibson1111/basedev can be used for.

Image
Languages & frameworks
Developer tools
0

294

kengibson1111/godev repository overview

This image derives from kengibson1111/basedev. See the description and overview of that image for more details. In addition to tools found in basedev, godev has Go 1.24.4 and make 4.4.1 installed. While very streamlined, this image inherits any vulnerabilities from kengibson1111/basedev. Three handy commands help identify vulnerabilities:

docker scout overview kengibson1111/godev
docker scout cves kengibson1111/godev
docker scout recommendations kengibson1111/godev

The challenge can be at the fine-grained package level - not all apk packages have vulnerability fixes from the default mirror at the same time. For example, alpine may have a latest package update available from the default mirror before a fine-grained package like alpine's binutils. Images should be checked often with the commands above to correct vulnerabilities as soon as possible.

Like basedev, this image has four volumes in the docker run command. The first volume will map to /root and contain common files typically stored in a user's home directory. The second volume will map to /var/local/myprojects. The third volume is unique to docker commands within the container. The fourth volume is for kubectl commands within the container - it is the parent directory of .kube directory. In the container, the KUBECONFIG environment variable is set to /var/local/kubeparent. I use this image for GitHub container-based development using VS Code. With the last two volume mappings, I can load projects that directly use docker and kubectl.

docker run -it --rm -v <local directory to store container user-home common files>:/root -v <local directory to store project files>:/var/local/myprojects -v //var/run/docker.sock://var/run/docker.sock -v <local parent directory of .kube directory>:/var/local/kubeparent kengibson1111/godev

Under the local "myprojects" directory, make sure to add golang/bin, golang/pkg, and golang/src directories. The godev image exports $GOPATH to /var/local/myprojects/golang and appends $GOPATH/bin to $PATH. If the three golang directories do not exist locally, the container will not have a valid $GOPATH.

For a .devcontainer.json example that uses this image, this repo has one.

Tag summary

Content type

Image

Digest

sha256:a644f3c97

Size

186.4 MB

Last updated

about 1 year ago

docker pull kengibson1111/godev