File tree Expand file tree Collapse file tree 2 files changed +75
-0
lines changed
Expand file tree Collapse file tree 2 files changed +75
-0
lines changed Original file line number Diff line number Diff line change 1+ # Building the Pipeline Docker Image
2+ To build the Docker image, run:
3+
4+ ```
5+ docker build -t dm-bip-env .
6+ ```
7+
8+ # Start the Container
9+ The image's default command is:
10+
11+ ```
12+ poetry run dm-bip run
13+ ```
14+
15+ To start the container and run the default command:
16+ ```
17+ docker run --rm dm-bip-env
18+ ```
19+
20+ You should see "Hello, World!" printed in the output.
21+
22+ # Run Other Commands
23+ If you want to run additional commands inside the container, append them after the image name. For example:
24+
25+ ```
26+ docker run --rm -it dm-bip-env make test
27+ ```
28+
29+ ```
30+ docker run --rm -it dm-bip-env make lint
31+ ```
32+
33+
Original file line number Diff line number Diff line change 1+ FROM python:3.12-slim
2+
3+ ENV DEBIAN_FRONTEND=noninteractive
4+
5+ # Poetry / pip config
6+ ENV POETRY_VERSION=1.8.4 \
7+ POETRY_NO_INTERACTION=1 \
8+ PIP_NO_CACHE_DIR=1 \
9+ # Force Poetry to create a virtualenv instead of reusing system site-packages
10+ POETRY_VIRTUALENVS_CREATE=true \
11+ POETRY_DYNAMIC_VERSIONING_BYPASS=true
12+
13+ # System dependencies
14+ RUN apt-get update && \
15+ apt-get install -y --no-install-recommends \
16+ build-essential \
17+ git \
18+ && rm -rf /var/lib/apt/lists/*
19+
20+ # 🔹 Make sure the global tooling is modern enough for Poetry's installer
21+ RUN pip install --upgrade pip setuptools wheel packaging
22+
23+ # Install Poetry + Cruft
24+ RUN pip install "poetry==${POETRY_VERSION}" cruft
25+
26+ WORKDIR /app
27+
28+
29+ # Copy dependency files first for caching
30+ # COPY pyproject.toml poetry.lock* ./
31+
32+ # Copy the entire project
33+ COPY . .
34+
35+ # Install dependencies using the same groups as on your local machine
36+ # Uses the lock file; will run inside Poetry's own virtualenv
37+ RUN poetry install --with env --with dev
38+
39+
40+
41+ # Default command – adjust if needed
42+ CMD ["poetry" , "run" , "dm-bip" , "run" ]
You can’t perform that action at this time.
0 commit comments