Sign inSign up

sommerfeldio/devcontainer

By sommerfeldio

•Updated 3 days ago

Collection of Docker images for various purposes.

Image
0

10K+

sommerfeldio/devcontainer repository overview

⁠sommerfeldio/devcontainer

The sommerfeldio/devcontainer Docker image serves as a foundational development environment for projects under the sommerfeld.io⁠ organization. It includes essential tools required by all repositories. It can be used as either a ready-to-use development container for immediate coding, or as a base image that can be extended with additional tools as needed.

⁠Software Tags and Versioning

Learn about our tagging policy and the difference between rolling tags and immutable tags on our documentation page⁠⁠.

⁠Software Bill of Materials (SBOM)

Starting with version 0.25.2, a Software Bill of Materials (SBOM) in SPDX format is generated for every image at build time and attached directly to the image in Docker Hub as an OCI attestation, available for the edge, latest and versioned tags. Retrieve it with

  • docker scout sbom sommerfeldio/devcontainer:latest or
  • docker buildx imagetools inspect sommerfeldio/devcontainer:latest --format "{{ json .SBOM }}".

The same SBOM is also attached as a downloadable asset on each GitHub release⁠.

⁠Usage

Three image variants are published from the same Dockerfile, one stage per variant:

  • The base stage is published as sommerfeldio/devcontainer:<version>, :edge, and :latest and provides the default development environment.
  • The ansible stage is published as sommerfeldio/devcontainer:<version>-ansible, :edge-ansible, and :latest-ansible and adds ansible-dev-tools on top of the base stage, including tools such as ansible-playbook, ansible-lint, ansible-navigator, and molecule on PATH.
  • The go stage is published as sommerfeldio/devcontainer:<version>-go, :edge-go, and :latest-go and adds the Go toolchain, gopls, dlv, and build-essential on top of the base stage for Go development.

Both variants are based on Microsoft's mcr.microsoft.com/devcontainers/base:resolute⁠ image, which tracks the current Ubuntu LTS base image published by Microsoft Dev Containers. They are configured to run as the non-root user vscode by default. File permissions and mounted volumes will be owned and accessed by the vscode user (uid = 1000, gid = 1000).

The easiest way to use either variant is by adding a Dockerfile to your repository's .devcontainer folder and extending the matching sommerfeldio/devcontainer tag. This approach provides several benefits:

  • Ensures that pipelines can validate the Devcontainer setup.
  • Allows Dependabot to track updates.
  • Makes it easy to extend the image with additional tools as needed.
⁠Usage: Default Image (base stage)

Extend the plain sommerfeldio/devcontainer tag for the default development environment:

FROM sommerfeldio/devcontainer:latest
LABEL maintainer="[email protected]"
{
    "name": "project-name",
    "build": {
        "dockerfile": "Dockerfile"
    },

    "customizations": {
        "vscode": {
            "settings": {},
            "extensions": [
                "ms-azuretools.vscode-docker",
                "github.vscode-github-actions",
                "redhat.vscode-yaml"
            ]
        }
    },

    "features": {
        "ghcr.io/devcontainers/features/docker-in-docker:4.0.0": {
            "moby": false
        }
    }
}
⁠Usage: Ansible Variant (ansible stage)

If you need the Ansible tooling, extend the published -ansible tag instead:

FROM sommerfeldio/devcontainer:latest-ansible
LABEL maintainer="[email protected]"

The .devcontainer/devcontainer.json shown above works unchanged for this variant. In addition to everything in the base stage, the ansible stage puts ansible-dev-tools (ansible-playbook, ansible-lint, ansible-navigator, molecule, and related tools) on PATH.

⁠Usage: Go Variant (go stage)

If you need Go tooling, extend the published -go tag instead:

FROM sommerfeldio/devcontainer:latest-go
LABEL maintainer="[email protected]"

The .devcontainer/devcontainer.json shown above works unchanged for this variant. In addition to everything in the base stage, the go stage provides the Go toolchain plus gopls, dlv, and build-essential on PATH for Go development, debugging, and CGO-based builds.

⁠How to Build

Use the repository's canonical task workflow to build the published variants locally:

task build:devcontainer

task build:devcontainer-ansible

task build:devcontainer-go

The underlying Dockerfile exposes explicit base, ansible, and go stages. Equivalent raw Docker commands are shown below using the repository's local tagging convention (local/devcontainer:dev, local/devcontainer:dev-ansible, and local/devcontainer:dev-go):

To build the default image from the explicit base stage locally, run:

docker build -f components/devcontainer/Dockerfile --target base -t local/devcontainer:dev components/devcontainer

To build the published Ansible variant from the explicit ansible stage locally, run:

docker build -f components/devcontainer/Dockerfile --target ansible -t local/devcontainer:dev-ansible components/devcontainer

To build the published Go variant from the explicit go stage locally, run:

docker build -f components/devcontainer/Dockerfile --target go -t local/devcontainer:dev-go components/devcontainer

⁠License

This container image is inheriting the MIT License from the GitHub repository⁠.

The license from this GitHub repository is compatible with the license from the devcontainers project⁠ which is MIT as well.

Tag summary

Content type

Image

Digest

sha256:11d3ffa50…

Size

691.9 MB

Last updated

14 days ago

docker pull sommerfeldio/devcontainer