Sign inSign up

Go Development Container Images

Verified Publisher

devcontainers/go

By Microsoft

•Updated over 2 years ago

A dev container spec-supported image for working with Go.

5

microsoft/devcontainers-go repository overview

⁠Go

⁠About

Develop Go based applications. Includes appropriate runtime args, Go, common tools, extensions, and dependencies.

MetadataValue
ContributorsThe VS Code Team
CategoriesCore, Languages
Definition typeDockerfile
Published imagesmcr.microsoft.com/devcontainers/go
Available image variants1 / 1-trixie, 1.27 / 1.27-trixie, 1.26 / 1.26-trixie, 1.25 / 1.25-trixie, 1-bookworm, 1.27-bookworm, 1.26-bookworm, 1.25-bookworm (full list⁠)
Published image architecture(s)x86-64, arm64/aarch64 for trixie and bookworm variants
Container host OS supportLinux, macOS, Windows
Container OSDebian
Languages, platformsGo

See history⁠ for information on the contents of published images.

⁠Using this image

You can directly reference pre-built versions of Dockerfile by using the image property in .devcontainer/devcontainer.json or updating the FROM statement in your own Dockerfile to one of the following. An example Dockerfile is included in this repository.

  • mcr.microsoft.com/devcontainers/go (latest)
  • mcr.microsoft.com/devcontainers/go:1 (or 1-trixie, 1-bookworm to pin to an OS version)
  • mcr.microsoft.com/devcontainers/go:1.27 (or 1.27-trixie, 1.27-bookworm to pin to an OS version)
  • mcr.microsoft.com/devcontainers/go:1.26 (or 1.26-trixie, 1.26-bookworm to pin to an OS version)
  • mcr.microsoft.com/devcontainers/go:1.25 (or 1.25-trixie, 1.25-bookworm to pin to an OS version)

Refer to this guide⁠ for more details.

You can decide how often you want updates by referencing a semantic version⁠ of each image. For example:

  • mcr.microsoft.com/devcontainers/go:2-1.27 (or 2-1.27-trixie, 2-1.27-bookworm)
  • mcr.microsoft.com/devcontainers/go:2.3-1.27 (or 2.3-1.27-trixie, 2.3-1.27-bookworm)
  • mcr.microsoft.com/devcontainers/go:2.3.0-1.27 (or 2.3.0-1.27-trixie, 2.3.0-1.27-bookworm)

However, we only do security patching on the latest non-breaking, in support⁠ versions of images (e.g. 2-1.27). You may want to run apt-get update && apt-get upgrade in your Dockerfile if you lock to a more specific version to at least pick up OS security updates.

See history⁠ for information on the contents of each version and here for a complete list of available tags⁠.

⁠Installing Node.js

Given JavaScript front-end web client code written for use in conjunction with a Go back-end often requires the use of Node.js-based utilities to build, you can use a Node feature⁠ to install any version of Node by adding the following to devcontainer.json:

{
  "features": {
    "ghcr.io/devcontainers/features/node:1": {
      "version": "latest"
    }
  }
}

⁠Support

The dev container spec images are maintained in the devcontainers/images⁠ repo. You can explore each image and open issues or feature requests.

⁠License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License. See LICENSE⁠.

Tag Summary

No tags have been pushed to this repository yet.