Convert Figma logo to code with AI

devcontainers logoimages

Repository for pre-built dev container images published under mcr.microsoft.com/devcontainers

1,219
448
1,219
60

Top Related Projects

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!

Primary source of truth for the Docker "Official Images" program

Ready-to-run Docker images containing Jupyter applications

Bitnami container images

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit

Quick Overview

The devcontainers/images repository is a collection of pre-built development container images maintained by Microsoft. These images are designed to be used with Visual Studio Code's Remote - Containers extension and GitHub Codespaces, providing ready-to-use development environments for various programming languages and tools.

Pros

  • Saves time in setting up consistent development environments
  • Supports a wide range of programming languages and frameworks
  • Regularly updated and maintained by Microsoft
  • Easily customizable to fit specific project needs

Cons

  • May require additional setup for complex project requirements
  • Can be resource-intensive, especially for older or less powerful machines
  • Learning curve for developers new to containerization
  • Limited to the pre-configured tools and versions included in each image

Getting Started

To use a dev container image from this repository:

  1. Install Docker and the Visual Studio Code Remote - Containers extension
  2. Create a .devcontainer folder in your project root
  3. Add a devcontainer.json file with the following content (example for Node.js):
{
    "name": "Node.js",
    "image": "mcr.microsoft.com/devcontainers/javascript-node:0-18"
}
  1. Reopen your project in a container using the VS Code command palette: "Remote-Containers: Reopen in Container"

For more detailed instructions and customization options, refer to the repository's documentation.

Competitor Comparisons

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!

Pros of vscode-dev-containers

  • More comprehensive documentation and examples
  • Tighter integration with VS Code features
  • Includes configuration files for VS Code settings and extensions

Cons of vscode-dev-containers

  • Larger repository size due to more extensive content
  • Potentially slower updates compared to the newer images repository
  • Some configurations may be overly complex for simple use cases

Code Comparison

vscode-dev-containers:

{
    "name": "Node.js",
    "build": {
        "dockerfile": "Dockerfile",
        "args": { "VARIANT": "14" }
    },
    "settings": { 
        "terminal.integrated.shell.linux": "/bin/bash"
    },
    "extensions": [
        "dbaeumer.vscode-eslint"
    ]
}

images:

FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-14

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
#     && apt-get -y install --no-install-recommends <your-package-list-here>

The vscode-dev-containers repository provides a more detailed configuration, including VS Code-specific settings and extensions. The images repository focuses on providing a streamlined Dockerfile for container creation, allowing for more flexibility in how the development environment is set up outside of the container definition itself.

Primary source of truth for the Docker "Official Images" program

Pros of official-images

  • Wider range of base images for various programming languages and tools
  • Officially maintained by Docker, ensuring high-quality and security standards
  • More frequent updates and maintenance

Cons of official-images

  • Less focused on development container scenarios
  • May require additional configuration for specific development environments
  • Limited customization options for development-specific tools

Code Comparison

official-images:

FROM debian:bullseye-slim

RUN apt-get update && apt-get install -y \
    python3 \
    python3-pip \
    && rm -rf /var/lib/apt/lists/*

CMD ["python3"]

images:

FROM mcr.microsoft.com/vscode/devcontainers/base:0-bullseye

ARG PYTHON_VERSION="3.9"
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
    && apt-get -y install --no-install-recommends python${PYTHON_VERSION} \
    && apt-get clean -y && rm -rf /var/lib/apt/lists/*

The official-images Dockerfile focuses on creating a minimal Python environment, while the images Dockerfile builds upon a development-oriented base image and includes additional tools for a more comprehensive development setup.

Ready-to-run Docker images containing Jupyter applications

Pros of jupyter/docker-stacks

  • Specialized for data science and machine learning workflows
  • Includes pre-installed popular scientific libraries and tools
  • Offers a variety of image options tailored for different use cases

Cons of jupyter/docker-stacks

  • Less flexible for general-purpose development environments
  • May include unnecessary packages for non-data science projects
  • Larger image sizes due to comprehensive package inclusions

Code Comparison

jupyter/docker-stacks:

FROM jupyter/base-notebook

RUN pip install --no-cache-dir \
    pandas \
    matplotlib \
    scikit-learn

devcontainers/images:

FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu

RUN apt-get update && apt-get install -y \
    python3 \
    python3-pip

The jupyter/docker-stacks example focuses on installing specific data science libraries, while the devcontainers/images example provides a more general-purpose setup with basic Python installation. This reflects the different priorities and use cases of the two projects.

Bitnami container images

Pros of containers

  • Extensive collection of production-ready container images for various applications and frameworks
  • Regular updates and security patches for all images
  • Detailed documentation and usage examples for each container

Cons of containers

  • Less focus on development environments compared to images
  • May require more configuration for local development setups
  • Limited integration with specific IDEs or development tools

Code comparison

containers:

FROM bitnami/minideb:bullseye
LABEL maintainer="Bitnami <containers@bitnami.com>"

ENV HOME="/" \
    OS_ARCH="amd64" \
    OS_FLAVOUR="debian-11" \
    OS_NAME="linux"

images:

FROM mcr.microsoft.com/vscode/devcontainers/base:0-bullseye
LABEL maintainer="Microsoft Corporation"

ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

The containers Dockerfile focuses on setting up a minimal base image with environment variables, while the images Dockerfile is tailored for development environments with user-specific configurations.

Both repositories provide valuable container solutions, but they cater to different use cases. containers is better suited for production deployments, while images is optimized for development environments and integrates well with Visual Studio Code and GitHub Codespaces.

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit

Pros of buildkit

  • Highly optimized build system with advanced caching and parallelization
  • Supports multi-platform builds and cross-compilation
  • Extensible plugin architecture for custom build steps

Cons of buildkit

  • Steeper learning curve for complex build scenarios
  • Requires more setup and configuration compared to simpler solutions
  • May be overkill for basic container image builds

Code comparison

buildkit:

# syntax=docker/dockerfile:1.4
FROM alpine
RUN --mount=type=cache,target=/var/cache/apk \
    apk add --update gcc
COPY . /src
RUN --mount=type=cache,target=/root/.cache/go-build \
    go build -o /bin/myapp /src

devcontainers/images:

FROM mcr.microsoft.com/vscode/devcontainers/base:0-alpine
RUN apk add --no-cache python3
COPY requirements.txt /tmp/pip-tmp/
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt

Key differences

  • buildkit focuses on optimized, multi-platform builds with advanced caching
  • devcontainers/images provides pre-configured development environments
  • buildkit offers more flexibility but requires more setup
  • devcontainers/images is simpler to use but less customizable

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Development Containers Images

devcontainers organization logo Development Container Images
Published docker images for use as development containers

A development container is a running Docker container with a well-defined tool/runtime stack and its prerequisites. It allows you to use a container as a full-featured development environment which can be used to run an application, to separate tools, libraries, or runtimes needed for working with a codebase, and to aid in continuous integration and testing.

This repository contains a set of dev container images which are Docker images built with dev container features.

Contents

  • src - Contains reusable dev container images.

Common Questions

How does this repo relate to the dev container spec? What is the dev container specification?

The Development Containers Specification seeks to find ways to enrich existing formats with common development specific settings, tools, and configuration while still providing a simplified, un-orchestrated single container option – so that they can be used as coding environments or for continuous integration and testing. You may review the spec and learn more about it in the devcontainers/spec repo and containers.dev.

This repository supplies images that may be used in dev container configurations that follow the spec.

What is the goal of devcontainer.json?

A devcontainer.json file is similar to launch.json for debugging, but designed to launch (or attach to) a development container instead. At its simplest, all you need is a .devcontainer/devcontainer.json file in your project that references an image, Dockerfile, or docker-compose.yml, and a few properties.

Why do Dockerfiles in this repo use RUN statements with commands separated by &&?

Each RUN statement creates a Docker image "layer". If one RUN statement adds temporary contents, these contents remain in this layer in the image even if they are deleted in a subsequent RUN. This means the image takes more storage locally and results in slower image download times if you publish the image to a registry. You can resolve this problem by using a RUN statement that includes any clean up steps (separated by &&) after a given operation. You can find more tips here.

How can I contribute?

If you want to create your own image or add functionality on top of the images available in this repository, then see How to write Dockerfiles and the dev container features reference.

This repository contains a select set of images, and we encourage the community to host and share additional images, and features rather than adding them here. You may learn more about this process in the guidance in our spec repo. You may also check out the features repo for additional customizations you may adopt or modify for your dev containers.

Feedback

Issues related to these images can be reported in an issue in this repository.

License

Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See LICENSE.

For images generated from this repository, see LICENSE and NOTICE.txt.