Skip to content

Commit 6824faa

Browse files
Add devcontainer Dockerfile and .dockerignore, update pyproject.toml
1 parent dc5c9e9 commit 6824faa

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Use official Python slim image
2+
FROM python:3.11-slim
3+
4+
# Set working directory inside container
5+
WORKDIR /app
6+
7+
# Copy only necessary files to build context
8+
COPY pyproject.toml .
9+
COPY README.md .
10+
COPY py_launch_blueprint/ ./py_launch_blueprint/
11+
COPY tests/ ./tests/
12+
13+
# Set environment variable to bypass setuptools-scm git version detection
14+
ENV SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0
15+
16+
# Install dependencies and your package
17+
RUN pip install --no-cache-dir .
18+
19+
# Define default entrypoint command
20+
ENTRYPOINT ["py-launch"]

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
__pycache__/
2+
.devcontainer/
3+
.vscode/
4+
*.pyc
5+
*.pyo
6+
*.pyd
7+
*.pytest_cache/
8+
.git/

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ docs = [
4343

4444

4545
[project.scripts]
46+
py-launch = "py_launch_blueprint.projects:main" #This creates the Docker Template
4647
py-projects = "py_launch_blueprint.projects:main"
4748

4849
[build-system]

0 commit comments

Comments
 (0)