Skip to content

Add Podman usage documentation for devcontainer #24

@gerchowl

Description

@gerchowl

Description

Add documentation for using the devcontainer with Podman in three different ways. Currently, the repository only has the .devcontainer/devcontainer.json file, but users may want to use Podman directly instead of VS Code/Cursor's built-in devcontainer support.

Tasks

Option 1: Direct Podman CLI Usage

  • Add quickstart section to README with proper command order:
    • Start container with correct volume mounts and working directory
    • Run initialization scripts in correct order (post-create.sh, post-attach.sh)
    • Include proper SELinux context (:Z flag for Linux systems)

Example command:

podman run -it --rm \
  -v "${PWD}:/workspace:Z" \
  -w /workspace \
  ghcr.io/morepet/containers/dev/typst:1.3-dev \
  /bin/bash

# Then manually run:
/workspace/.devcontainer/post-create.sh
/workspace/.devcontainer/post-attach.sh

Option 2: Podman Compose

  • Create podman-compose.yml file in repository root
  • Document the compose file in README similar to Option 1
  • Include instructions for starting: podman-compose up -d

Proposed compose file:

version: '3'
services:
  dev:
    image: ghcr.io/morepet/containers/dev/typst:1.3-dev
    volumes:
      - .:/workspace:cached
    working_dir: /workspace
    command: /bin/bash
    stdin_open: true
    tty: true

Option 3: Dev Container CLI

  • Add section to README about using @devcontainers/cli
  • Document installation: npm install -g @devcontainers/cli
  • Document usage: devcontainer up --workspace-folder . --docker-path podman
  • Note that this option provides the most complete devcontainer.json compatibility

Success Criteria

  • All three options are documented in README
  • Users can choose the option that best fits their workflow
  • Instructions include proper script execution order
  • SELinux considerations are mentioned for Linux users

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions