Skip to content

Commit 0e420ea

Browse files
committed
Add production behaviour
Signed-off-by: Maria Teresa Ortega <teresa.ortega0903@gmail.com>
1 parent 668745a commit 0e420ea

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build/
2+
install/
3+
log/
4+
__pycache__/
5+
*.pyc
6+
.venv/
7+
venv/
8+
.git/

examples/beluga/docker/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,19 @@ RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc
1919
FROM base AS development
2020
# Code is mounted via volume in docker-compose, nothing is copied here
2121
CMD ["bash"]
22+
23+
# ── Stage 2: production ────────────────────────────────────
24+
FROM base AS production
25+
26+
COPY . /ws/src/
27+
28+
RUN /usr/bin/uv pip install /ws/src/ --system --break-system-packages \
29+
&& rm -rf /ws/src/README.md /ws/src/pyproject.toml
30+
31+
RUN apt-get update \
32+
&& rosdep install --from-paths src --ignore-src -y \
33+
&& rm -rf /var/lib/apt/lists/*
34+
35+
RUN . /opt/ros/jazzy/setup.sh && colcon build
36+
37+
CMD ["bash"]

0 commit comments

Comments
 (0)