From 6824faaf676590283e5af3c5640e11f4b82fa758 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 26 May 2025 19:31:18 -0600 Subject: [PATCH 1/9] Add devcontainer Dockerfile and .dockerignore, update pyproject.toml --- .devcontainer/Dockerfile | 20 ++++++++++++++++++++ .dockerignore | 8 ++++++++ pyproject.toml | 1 + 3 files changed, 29 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .dockerignore diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..b97e6dac --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,20 @@ +# Use official Python slim image +FROM python:3.11-slim + +# Set working directory inside container +WORKDIR /app + +# Copy only necessary files to build context +COPY pyproject.toml . +COPY README.md . +COPY py_launch_blueprint/ ./py_launch_blueprint/ +COPY tests/ ./tests/ + +# Set environment variable to bypass setuptools-scm git version detection +ENV SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 + +# Install dependencies and your package +RUN pip install --no-cache-dir . + +# Define default entrypoint command +ENTRYPOINT ["py-launch"] diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..784aa343 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +__pycache__/ +.devcontainer/ +.vscode/ +*.pyc +*.pyo +*.pyd +*.pytest_cache/ +.git/ diff --git a/pyproject.toml b/pyproject.toml index 2c602135..a16d146e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,7 @@ docs = [ [project.scripts] +py-launch = "py_launch_blueprint.projects:main" #This creates the Docker Template py-projects = "py_launch_blueprint.projects:main" [build-system] From 812bbc40d21b6982fdd8ce7be484408ca136602a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 4 Jun 2025 12:30:30 -0600 Subject: [PATCH 2/9] Devcontainer improvements --- .devcontainer/Dockerfile | 18 ++++++++++++------ .devcontainer/devcontainer.json | 15 +++++++++++++++ Justfile | 4 ++++ 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b97e6dac..f7d99b2a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,20 +1,26 @@ # Use official Python slim image FROM python:3.11-slim +# Install system dependencies, docker CLI, and 'just' into /usr/local/bin +RUN apt-get update && apt-get install -y --no-install-recommends \ + curl unzip ca-certificates gnupg docker.io \ + && curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + # Set working directory inside container WORKDIR /app -# Copy only necessary files to build context -COPY pyproject.toml . -COPY README.md . +# Copy project files to container +COPY pyproject.toml ./ +COPY README.md ./ COPY py_launch_blueprint/ ./py_launch_blueprint/ COPY tests/ ./tests/ -# Set environment variable to bypass setuptools-scm git version detection +# Set static version to avoid git dependency during install ENV SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 -# Install dependencies and your package +# Install Python dependencies and your package RUN pip install --no-cache-dir . -# Define default entrypoint command +# Define default entrypoint ENTRYPOINT ["py-launch"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..0e37f1a8 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,15 @@ +{ + "name": "py-launch-blueprint", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "postCreateCommand": "just --version", + "mounts": [ + "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" + ], + "remoteUser": "root", + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + } +} diff --git a/Justfile b/Justfile index bde43efc..60120d40 100644 --- a/Justfile +++ b/Justfile @@ -628,5 +628,9 @@ clean-pr-to-testrepo new_repo_name="test-actions-repo": # just build # just run +_container_setup: + @MSYS_NO_PATHCONV=1 docker build -t py-launch-dev -f .devcontainer/Dockerfile . + @MSYS_NO_PATHCONV=1 docker run --rm -e PY_TOKEN=dummy -it --entrypoint /bin/bash py-launch-dev -c "echo '✅ Container ran successfully! You are now inside the container shell.'; exec bash" + # Alias for dev (full developer cycle: format → lint → test → build) alias cycle := dev From f357c996b8e719f634ae5d87801f3b76f1823b19 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 4 Jun 2025 12:33:11 -0600 Subject: [PATCH 3/9] Devcontainer improvements --- .devcontainer/Dockerfile | 2 +- Justfile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index f7d99b2a..3f7b472c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,7 @@ # Use official Python slim image FROM python:3.11-slim -# Install system dependencies, docker CLI, and 'just' into /usr/local/bin +# Install system dependencies, docker CLI, and 'just' into /usr/local/bin usage RUN apt-get update && apt-get install -y --no-install-recommends \ curl unzip ca-certificates gnupg docker.io \ && curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin \ diff --git a/Justfile b/Justfile index 60120d40..841fbd3d 100644 --- a/Justfile +++ b/Justfile @@ -628,6 +628,7 @@ clean-pr-to-testrepo new_repo_name="test-actions-repo": # just build # just run +# Container Just Command _container_setup: @MSYS_NO_PATHCONV=1 docker build -t py-launch-dev -f .devcontainer/Dockerfile . @MSYS_NO_PATHCONV=1 docker run --rm -e PY_TOKEN=dummy -it --entrypoint /bin/bash py-launch-dev -c "echo '✅ Container ran successfully! You are now inside the container shell.'; exec bash" From 2cbbd3a9546f438e90b5c806a98473ba270f8826 Mon Sep 17 00:00:00 2001 From: husnain <52630357+husnain067@users.noreply.github.com> Date: Fri, 13 Jun 2025 01:39:06 +0500 Subject: [PATCH 4/9] update the current docker file with new config --- .devcontainer/Dockerfile | 22 ++++----- docs/source/tools/docker.md | 92 +++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 3 files changed, 103 insertions(+), 13 deletions(-) create mode 100644 docs/source/tools/docker.md diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3f7b472c..4a123534 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,26 +1,24 @@ -# Use official Python slim image FROM python:3.11-slim -# Install system dependencies, docker CLI, and 'just' into /usr/local/bin usage RUN apt-get update && apt-get install -y --no-install-recommends \ - curl unzip ca-certificates gnupg docker.io \ - && curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin \ - && apt-get clean && rm -rf /var/lib/apt/lists/* + curl unzip ca-certificates gnupg docker.io git \ + && curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin \ + && curl -Ls https://astral.sh/uv/install.sh | bash \ + && ln -s /root/.cargo/bin/uv /usr/local/bin/uv \ + && ln -s /root/.cargo/bin/uvx /usr/local/bin/uvx \ + && apt-get clean && rm -rf /var/lib/apt/lists/* -# Set working directory inside container WORKDIR /app -# Copy project files to container COPY pyproject.toml ./ COPY README.md ./ COPY py_launch_blueprint/ ./py_launch_blueprint/ COPY tests/ ./tests/ +COPY Justfile ./ -# Set static version to avoid git dependency during install -ENV SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 +ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PY_LAUNCH_BLUEPRINT=0.0.1 -# Install Python dependencies and your package -RUN pip install --no-cache-dir . +RUN pip install --no-cache-dir --upgrade pip setuptools wheel setuptools-scm \ + && pip install --no-cache-dir . -# Define default entrypoint ENTRYPOINT ["py-launch"] diff --git a/docs/source/tools/docker.md b/docs/source/tools/docker.md new file mode 100644 index 00000000..5f6ecf66 --- /dev/null +++ b/docs/source/tools/docker.md @@ -0,0 +1,92 @@ +# Using Docker with `py-launch-blueprint` + +This project includes full support for running and testing via Docker. This ensures a reproducible, isolated development environment with all tools preinstalled — including the CLI, `just`, `ruff`, and test dependencies. + +--- + +## 🐳 Getting Started + +### 1. **Build the Docker Image** + +From the project root: + +```bash +docker build -t py-launch-dev -f .devcontainer/Dockerfile . +``` + +### 2. **Run the Container** + +```bash +docker run --rm -it py-launch-dev +``` + +This launches the container and drops you into an interactive shell where you can run CLI commands. + +--- + +## 🛠️ CLI Usage + +Once inside the container, the CLI is available directly via the `py-launch` entrypoint: + +```bash +py-launch +``` + +Or using any aliases/scripts defined: + +```bash +just +just test +just lint +``` + +--- + +## ⚙️ Available Commands + +| Command | Description | +|----------------|----------------------------------| +| `just` | Show all available recipes | +| `just test` | Run unit tests inside container | +| `just lint` | Run Ruff linter checks | +| `just format` | Run formatter (`ruff format`) | +| `py-launch` | Run the CLI tool | + +--- + +## 🧪 Running in CI + +The Dockerfile is suitable for CI environments. You can use it in GitHub Actions or other CI runners like: + +```yaml +- name: Build image + run: docker build -t py-launch-dev -f .devcontainer/Dockerfile . + +- name: Run tests + run: docker run --rm py-launch-dev just test +``` + +--- + +## 🔄 Rebuilding the Container + +If you change dependencies or update the Dockerfile, rebuild with: + +```bash +docker build --no-cache -t py-launch-dev -f .devcontainer/Dockerfile . +``` + +--- + +## ✅ Requirements + +- [Docker](https://docs.docker.com/get-docker/) installed +- Optional: [Just](https://github.com/casey/just) installed locally if using `just` outside container + +--- + +## 🧰 Container Notes + +- **Base Image**: Python 3.11 Slim +- **Includes**: `just`, `ruff`, `pytest`, `uv`, Docker CLI, and your project code +- **Mounts Docker socket** (optional, see `.devcontainer/devcontainer.json`) diff --git a/pyproject.toml b/pyproject.toml index a16d146e..d69ba070 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ py-launch = "py_launch_blueprint.projects:main" #This creates the Docker Templ py-projects = "py_launch_blueprint.projects:main" [build-system] -requires = ["hatchling", "hatch-vcs", "setuptools>=64", "setuptools-scm>=8"] +requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" [tool.setuptools_scm] From 03ab3d24769df2f5eb675e00111a96a5965f7e0e Mon Sep 17 00:00:00 2001 From: husnain <52630357+husnain067@users.noreply.github.com> Date: Sat, 14 Jun 2025 00:22:03 +0500 Subject: [PATCH 5/9] update the docker script file and just commands --- .devcontainer/Dockerfile | 25 +++++++++++++++++++------ .devcontainer/devcontainer.json | 15 --------------- .dockerignore | 1 - Justfile | 20 +++++++++++++++----- py_launch_blueprint/_version.py | 4 ++-- 5 files changed, 36 insertions(+), 29 deletions(-) delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4a123534..534a5c24 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,24 +1,37 @@ FROM python:3.11-slim +# Install system dependencies, docker CLI, git, 'just', and 'uv' RUN apt-get update && apt-get install -y --no-install-recommends \ curl unzip ca-certificates gnupg docker.io git \ && curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin \ - && curl -Ls https://astral.sh/uv/install.sh | bash \ - && ln -s /root/.cargo/bin/uv /usr/local/bin/uv \ - && ln -s /root/.cargo/bin/uvx /usr/local/bin/uvx \ + && curl -LsSf https://astral.sh/uv/install.sh | sh \ + && mv /root/.local/bin/uv /usr/local/bin/ \ + && mv /root/.local/bin/uvx /usr/local/bin/ \ && apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /app +# Copy project files COPY pyproject.toml ./ COPY README.md ./ COPY py_launch_blueprint/ ./py_launch_blueprint/ +COPY .git/ ./.git/ COPY tests/ ./tests/ COPY Justfile ./ -ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PY_LAUNCH_BLUEPRINT=0.0.1 +# Initialize git repository for version detection +# RUN git init . && \ +# git config user.email "build@docker.com" && \ +# git config user.name "Docker Build" && \ +# git add . && \ +# git commit -m "Initial commit" && \ +# git tag v0.0.1 -RUN pip install --no-cache-dir --upgrade pip setuptools wheel setuptools-scm \ - && pip install --no-cache-dir . +# Install build dependencies +RUN pip install --no-cache-dir --upgrade pip hatchling hatch-vcs +# Install the package using uv +RUN uv pip install --system --no-cache . + +# Use correct entrypoint (CLI command name, not package name) ENTRYPOINT ["py-launch"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 0e37f1a8..00000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "py-launch-blueprint", - "build": { - "dockerfile": "Dockerfile", - "context": ".." - }, - "postCreateCommand": "just --version", - "mounts": [ - "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" - ], - "remoteUser": "root", - "settings": { - "terminal.integrated.shell.linux": "/bin/bash" - } -} diff --git a/.dockerignore b/.dockerignore index 784aa343..2a478ab9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,4 +5,3 @@ __pycache__/ *.pyo *.pyd *.pytest_cache/ -.git/ diff --git a/Justfile b/Justfile index 8c73ce88..b64fcb46 100644 --- a/Justfile +++ b/Justfile @@ -631,14 +631,24 @@ clean-pr-to-testrepo new_repo_name="test-actions-repo": # just build # just run -# Container Just Command -_container_setup: - @MSYS_NO_PATHCONV=1 docker build -t py-launch-dev -f .devcontainer/Dockerfile . - @MSYS_NO_PATHCONV=1 docker run --rm -e PY_TOKEN=dummy -it --entrypoint /bin/bash py-launch-dev -c "echo '✅ Container ran successfully! You are now inside the container shell.'; exec bash" - # Alias for dev (full developer cycle: format → lint → test → build) alias cycle := dev +# Build Docker container +[group('build'), group('dev')] +@container-setup: + echo "🔨 Building Docker container..." + docker build -t py-launch-dev:latest -f .devcontainer/Dockerfile . + echo "✅ Built py-launch-dev:latest" + +# Test Docker container functionality +[group('test')] +container-test: container-setup + @echo "🧪 Testing Docker container..." + docker run --rm py-launch-dev:latest --help + docker run --rm py-launch-dev:latest --version + @echo "✅ Docker integration working!" + # Install Go [group('setup'), group('install')] @install-go: diff --git a/py_launch_blueprint/_version.py b/py_launch_blueprint/_version.py index e22b9a80..d9f486fc 100644 --- a/py_launch_blueprint/_version.py +++ b/py_launch_blueprint/_version.py @@ -17,5 +17,5 @@ __version_tuple__: VERSION_TUPLE version_tuple: VERSION_TUPLE -__version__ = version = '0.1.dev338' -__version_tuple__ = version_tuple = (0, 1, 'dev338') +__version__ = version = "0.1.dev338" +__version_tuple__ = version_tuple = (0, 1, "dev338") From dbd3576bad48291ba9add37f1352e7a80ad3f0e7 Mon Sep 17 00:00:00 2001 From: husnain <52630357+husnain067@users.noreply.github.com> Date: Sat, 14 Jun 2025 00:29:23 +0500 Subject: [PATCH 6/9] revert pyproject.toml changes --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c70ab221..0d12ff41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ py-launch = "py_launch_blueprint.projects:main" #This creates the Docker Templ py-projects = "py_launch_blueprint.projects:main" [build-system] -requires = ["hatchling", "hatch-vcs"] +requires = ["hatchling", "hatch-vcs", "setuptools>=64", "setuptools-scm>=8"] build-backend = "hatchling.build" [tool.setuptools_scm] From 6247b5a7ef9368ea2c8e422cbc0785c6790d5b2d Mon Sep 17 00:00:00 2001 From: husnain <52630357+husnain067@users.noreply.github.com> Date: Sat, 14 Jun 2025 00:41:51 +0500 Subject: [PATCH 7/9] update the docker.md doc file --- Justfile | 6 +- docs/source/tools/docker.md | 111 +++++++++++++++++------------------- 2 files changed, 56 insertions(+), 61 deletions(-) diff --git a/Justfile b/Justfile index b64fcb46..e3fd2f20 100644 --- a/Justfile +++ b/Justfile @@ -643,11 +643,11 @@ alias cycle := dev # Test Docker container functionality [group('test')] -container-test: container-setup - @echo "🧪 Testing Docker container..." +@container-test: container-setup + echo "🧪 Testing Docker container..." docker run --rm py-launch-dev:latest --help docker run --rm py-launch-dev:latest --version - @echo "✅ Docker integration working!" + echo "✅ Docker integration working!" # Install Go [group('setup'), group('install')] diff --git a/docs/source/tools/docker.md b/docs/source/tools/docker.md index 5f6ecf66..9427a4e7 100644 --- a/docs/source/tools/docker.md +++ b/docs/source/tools/docker.md @@ -1,92 +1,87 @@ # Using Docker with `py-launch-blueprint` -This project includes full support for running and testing via Docker. This ensures a reproducible, isolated development environment with all tools preinstalled — including the CLI, `just`, `ruff`, and test dependencies. +This project includes Docker support for running and testing the CLI tool in a consistent, isolated environment. The containerized version includes all necessary dependencies and tools — including the CLI, `just`, `uv`, Docker CLI, and development tools. ---- - -## 🐳 Getting Started - -### 1. **Build the Docker Image** - -From the project root: - -```bash -docker build -t py-launch-dev -f .devcontainer/Dockerfile . -``` - -### 2. **Run the Container** - -```bash -docker run --rm -it py-launch-dev -``` +## Purpose and Problem Solved +Docker support automates the setup of a consistent development and runtime environment for the py-launch CLI tool. It eliminates "works on my machine" issues and provides a reproducible environment with all dependencies pre-installed, helping maintain development consistency and simplifying deployment. -This launches the container and drops you into an interactive shell where you can run CLI commands. +## Key Benefits and Value Proposition +- **Consistent environment** across all development machines and CI/CD +- **Pre-installed dependencies** including Python 3.11, uv, just, and Docker CLI +- **Isolated execution** preventing conflicts with local Python installations +- **Fast setup** with single command container builds +- **CI/CD ready** for automated testing and deployment --- -## 🛠️ CLI Usage +## Getting Started -Once inside the container, the CLI is available directly via the `py-launch` entrypoint: +### Basic Setup Steps +1. Ensure Docker is installed and running on your system +2. Build the container using the provided justfile commands +3. The container includes all necessary tools and your CLI application pre-installed +### Quick Example ```bash -py-launch -``` - -Or using any aliases/scripts defined: +# Build the Docker container +just container-setup -```bash -just -just test -just lint +# Test the CLI tool +just container-test ``` --- -## ⚙️ Available Commands +## Usage -| Command | Description | -|----------------|----------------------------------| -| `just` | Show all available recipes | -| `just test` | Run unit tests inside container | -| `just lint` | Run Ruff linter checks | -| `just format` | Run formatter (`ruff format`) | -| `py-launch` | Run the CLI tool | +### Common Use Cases +- **Development**: Test CLI changes in isolated environment +- **CI/CD**: Run automated tests and builds +- **Distribution**: Package and deploy the CLI tool +- **Troubleshooting**: Debug issues in clean environment --- -## 🧪 Running in CI +## Configuration -The Dockerfile is suitable for CI environments. You can use it in GitHub Actions or other CI runners like: - -```yaml -- name: Build image - run: docker build -t py-launch-dev -f .devcontainer/Dockerfile . - -- name: Run tests - run: docker run --rm py-launch-dev just test -``` +### Key Configuration Options +- **Base Image**: `python:3.11-slim` (lightweight and secure) +- **Working Directory**: `/app` +- **Build Backend**: Hatchling with hatch-vcs for version management +- **Package Manager**: uv for fast dependency installation --- -## 🔄 Rebuilding the Container - -If you change dependencies or update the Dockerfile, rebuild with: +## Testing +### Standalone Testing ```bash -docker build --no-cache -t py-launch-dev -f .devcontainer/Dockerfile . +# Build and test the container +just container-setup +just container-test ``` --- -## ✅ Requirements +## Troubleshooting + +### Common Issues +1. **Build Failures**: Clean rebuild with `docker build --no-cache` +2. **Permission Issues**: Run as current user with `--user $(id -u):$(id -g)` +3. **Token Authentication**: Verify `PY_TOKEN` environment variable is set -- [Docker](https://docs.docker.com/get-docker/) installed -- Optional: [Just](https://github.com/casey/just) installed locally if using `just` outside container +### Debug Commands +```bash +# Access container shell for debugging +docker run --rm -it --entrypoint /bin/bash py-launch-dev:latest + +# Check build logs +docker build --no-cache -t py-launch-dev:latest -f .devcontainer/Dockerfile . --progress=plain +``` --- -## 🧰 Container Notes +## References -- **Base Image**: Python 3.11 Slim -- **Includes**: `just`, `ruff`, `pytest`, `uv`, Docker CLI, and your project code -- **Mounts Docker socket** (optional, see `.devcontainer/devcontainer.json`) +- [Docker Documentation](https://docs.docker.com/) +- [Python 3.11 Docker Images](https://hub.docker.com/_/python) From 732547db57b3f43a4057be8e9da74e3e4c158646 Mon Sep 17 00:00:00 2001 From: husnain <52630357+husnain067@users.noreply.github.com> Date: Sat, 14 Jun 2025 00:43:39 +0500 Subject: [PATCH 8/9] update the docker.md doc --- .devcontainer/Dockerfile | 8 -------- docs/source/tools/docker.md | 4 ++++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 534a5c24..0fdf350a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -19,14 +19,6 @@ COPY .git/ ./.git/ COPY tests/ ./tests/ COPY Justfile ./ -# Initialize git repository for version detection -# RUN git init . && \ -# git config user.email "build@docker.com" && \ -# git config user.name "Docker Build" && \ -# git add . && \ -# git commit -m "Initial commit" && \ -# git tag v0.0.1 - # Install build dependencies RUN pip install --no-cache-dir --upgrade pip hatchling hatch-vcs diff --git a/docs/source/tools/docker.md b/docs/source/tools/docker.md index 9427a4e7..65b1632c 100644 --- a/docs/source/tools/docker.md +++ b/docs/source/tools/docker.md @@ -16,6 +16,10 @@ Docker support automates the setup of a consistent development and runtime envir ## Getting Started +### Prerequisites + +- [Docker](https://www.docker.com/) installed and running + ### Basic Setup Steps 1. Ensure Docker is installed and running on your system 2. Build the container using the provided justfile commands From be5bb38e2632a26564b197df8c4c6d0d7d95cb11 Mon Sep 17 00:00:00 2001 From: husnain <52630357+husnain067@users.noreply.github.com> Date: Sat, 14 Jun 2025 16:23:31 +0500 Subject: [PATCH 9/9] add a docker section in the readme file --- README.md | 2 ++ docs/source/tools/index.md | 3 +++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index b22c0d71..80f25fc9 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,8 @@ Teams and professionals needing maintainable, type-safe Python projects followin - **YAML validation with [yamllint](docs/source/tools/yaml_lint.md)**: Verify YAML files for syntax correctness, preventing configuration errors and deployment failures. +- **Docker & Dev Container support with [VS Code](docs/source/tools/docker.md)**: Reproduce identical environments across systems using Docker and Dev Containers. Simplify onboarding, eliminate setup issues, and enable Docker-in-Docker workflows for testing CLI tools in isolated, production-like environments. + ### Project Structure & Management - **Project configuration with `pyproject.toml`**: Organize all project settings in one standardized location, simplifying maintenance and configuration. diff --git a/docs/source/tools/index.md b/docs/source/tools/index.md index e4055c4b..562a38d2 100644 --- a/docs/source/tools/index.md +++ b/docs/source/tools/index.md @@ -16,6 +16,8 @@ Welcome to the Tools section of the Py Launch Blueprint documentation. This sect - [Justfiles](justfiles.md) - [precommit_hooks](precommit_hooks.md) - [CLA Assistant](cla-assistant.md) +- [Docker](docker.md) + Each of these sections contains detailed instructions and best practices to help you effectively use the tools in your development workflow. @@ -34,5 +36,6 @@ vs_code makefiles justfiles cla-assistant +docker ```