File tree Expand file tree Collapse file tree 4 files changed +15
-16
lines changed
camel/interpreters/docker Expand file tree Collapse file tree 4 files changed +15
-16
lines changed Original file line number Diff line number Diff line change 11FROM python:3.10-bookworm
22
33RUN pip install uv
4+ RUN groupadd -r appuser && useradd -r -g appuser appuser
45
56WORKDIR /app/camel
67COPY . .
8+ RUN chown -R appuser:appuser /app/camel
79
810RUN uv venv .venv --python=3.10 && \
911 . .venv/bin/activate && \
@@ -14,4 +16,6 @@ RUN uv venv .venv --python=3.10 && \
1416ENV VIRTUAL_ENV=/app/camel/.venv
1517ENV PATH="$VIRTUAL_ENV/bin:$PATH"
1618
19+ USER appuser
20+
1721CMD ["bash" ]
Original file line number Diff line number Diff line change @@ -9,4 +9,7 @@ services:
99 - ../:/app/camel
1010 env_file :
1111 - .env
12+ user : " ${UID:-1000}:${GID:-1000}"
1213 command : ["tail", "-f", "/dev/null"]
14+
15+
Original file line number Diff line number Diff line change 11FROM python:3.10-bookworm
22
3- # Install uv
43RUN pip install uv
4+ RUN groupadd -r appuser && useradd -r -g appuser appuser
55
66COPY . /app/camel
7-
87WORKDIR /app/camel
8+ RUN chown -R appuser:appuser /app/camel
99
10- # Setup virtual environment and install dependencies
1110RUN uv venv .venv --python=3.10 && \
1211 . .venv/bin/activate && \
1312 uv pip install -e ".[all, dev, docs]" && \
1413 pip install pre-commit mypy
1514
16- CMD ["tail" , "-f" , "/dev/null" ]
15+ USER appuser
16+
17+ CMD ["tail" , "-f" , "/dev/null" ]
Original file line number Diff line number Diff line change 11# syntax=docker/dockerfile:1
2-
32FROM ubuntu:22.04
43
5- # Set environment variable to avoid interactive prompts
64ENV DEBIAN_FRONTEND=noninteractive
75
8- # Update and install base utilities
96RUN apt-get update && apt-get install -y \
107 build-essential \
118 software-properties-common \
@@ -20,7 +17,6 @@ RUN apt-get update && apt-get install -y \
2017 && apt-get clean \
2118 && apt-get autoremove -y
2219
23- # Install Python 3.10 and its dependencies
2420RUN add-apt-repository ppa:deadsnakes/ppa && \
2521 apt-get update && \
2622 apt-get install -y \
@@ -34,32 +30,27 @@ RUN add-apt-repository ppa:deadsnakes/ppa && \
3430 && apt-get clean \
3531 && apt-get autoremove -y
3632
37- # Install R
3833RUN apt-get update && \
3934 apt-get install -y r-base && \
4035 rm -rf /var/lib/apt/lists/* && \
4136 apt-get clean && \
4237 apt-get autoremove -y
4338
44- # Install NodeJS 22.x
4539RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
4640 apt-get install -y nodejs && \
4741 rm -rf /var/lib/apt/lists/* && \
4842 apt-get clean && \
4943 apt-get autoremove -y
5044
51- # Install Poetry
5245RUN curl -fsSL https://install.python-poetry.org | python3.10 - && \
5346 ln -s ~/.local/bin/poetry /usr/local/bin/poetry
5447
55- # Upgrade pip and install base Python packages
5648RUN python3.10 -m pip install --upgrade pip setuptools wheel
57-
58- # Install uv using pip instead of the shell script
5949RUN pip install uv
6050
61- # Setup working directory
51+ RUN groupadd -r devuser && useradd -r -m -g devuser devuser
6252WORKDIR /workspace
53+ RUN chown -R devuser:devuser /workspace
54+ USER devuser
6355
64- # Set default shell
6556CMD ["/bin/bash" ]
You can’t perform that action at this time.
0 commit comments