Skip to content

Add a docker compose configuration file #135693

Open
@brettcannon

Description

@brettcannon

As suggested by @malemburg in https://discuss.python.org/t/what-do-people-want-to-see-to-make-supporting-wasi-easier/94472/ , we could add a .devcontainer/compose.yml file to provide another way to get the dev container beyond the instructions in the devguide (which I'm improving). It would probably be something along the lines of:

# Start: docker compose --file .devcontainer/compose.yml up --detach
# Get a shell: docker compose exec cpython-dev bash
# Stop: docker compose down
# Cleanup: docker compose rm cpython-dev
services:
  cpython-dev:
    image: ghcr.io/python/devcontainer:latest
    container_name: cpython-dev
    restart: unless-stopped
    entrypoint: sleep 86400
    working_dir: /workspace
    volumes:
      - ../:/workspace

The biggest benefit I can see from other approaches to using the image outside of GitHub Codespaces like docker run is you don't need to know where the container registry is to get going.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildinfraCI, GitHub Actions, buildbots, Dependabot, etc.type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions