Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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/*

# 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/

# Set static version to avoid git dependency during install
ENV SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0

# Install Python dependencies and your package
RUN pip install --no-cache-dir .

# Define default entrypoint
ENTRYPOINT ["py-launch"]
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
__pycache__/
.devcontainer/
.vscode/
*.pyc
*.pyo
*.pyd
*.pytest_cache/
.git/
5 changes: 5 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -628,5 +628,10 @@ 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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Loading