Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade argilla-server Docker image trying to fix some vulnerabilities #5486

Merged
merged 5 commits into from
Sep 17, 2024
Merged
Changes from all 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
36 changes: 19 additions & 17 deletions argilla-server/docker/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
FROM python:3.10.12-slim AS builder
FROM python:3.10-slim AS builder

# Copying argilla distribution files
COPY dist/*.whl /packages/
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN apt-get update && \
apt-get install -y python-dev-is-python3 libpq-dev gcc && \
pip install --upgrade pip && \
pip install uvicorn[standard] && \
for wheel in /packages/*.whl; do pip install "$wheel"[server,postgresql]; done && \
apt-get remove -y python-dev-is-python3 libpq-dev gcc && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /packages

FROM python:3.10.12-slim
apt-get upgrade -y && \
apt-get install -y python-dev-is-python3 libpq-dev gcc && \
pip install --upgrade pip && \
pip install uvicorn[standard] && \
for wheel in /packages/*.whl; do pip install "$wheel"[server,postgresql]; done && \
apt-get remove -y python-dev-is-python3 libpq-dev gcc && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /packages

FROM python:3.10-slim

# Environment Variables
ENV USERNAME=""
Expand All @@ -31,12 +32,13 @@ RUN useradd -ms /bin/bash argilla

# Create argilla volume
RUN mkdir -p "$ARGILLA_HOME_PATH" && \
chown argilla:argilla "$ARGILLA_HOME_PATH" && \
apt-get update && \
apt-get install -y libpq-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /packages
chown argilla:argilla "$ARGILLA_HOME_PATH" && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y libpq-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /packages
VOLUME $ARGILLA_HOME_PATH

COPY scripts/start_argilla_server.sh /home/argilla
Expand Down
Loading