Skip to content

Commit

Permalink
Merge pull request #60 from sgvictorino/shrink-docker-image
Browse files Browse the repository at this point in the history
Reduce build dependencies in Dockerfile
  • Loading branch information
syeopite authored Jul 20, 2024
2 parents 91ea062 + 0c2cf19 commit 540e0f3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ COPY ./src/ ./src/
COPY ./assets/ ./assets/
COPY ./locales/ ./locales/

# Rust is needed for orjson
RUN apk add --no-cache git python3 py3-pip rust cargo tini && \
RUN apk add --no-cache git python3 py3-setuptools tini && \
addgroup -g 1000 -S priviblur && \
adduser -u 1000 -S priviblur -G priviblur && \
pip3 install --break-system-packages -r requirements.txt && \
apk add --no-cache py3-pip && \
pip3 install --no-cache-dir --break-system-packages -r requirements.txt && \
pip3 cache purge && \
apk del py3-pip && \
pybabel compile -d locales -D priviblur && \
# chown is needed otherwise git will error out with "fatal: detected dubious ownership in repository at '/priviblur'"
chown -R priviblur:priviblur /priviblur && \
Expand Down

0 comments on commit 540e0f3

Please sign in to comment.