Skip to content

Commit

Permalink
Update dockerfile to support newer Ubuntu distribution requirement to…
Browse files Browse the repository at this point in the history
… install python in a virtual environment (#953)
  • Loading branch information
alexvinidiktov authored Feb 17, 2025
1 parent 69b51e7 commit 8d97e75
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions deployment_tools/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@

FROM ubuntu:latest

ARG user=py4web

RUN apt update && \
apt install -y git python3 python3-pip memcached && \
apt install -y git python3 python3-pip python3-venv memcached && \
service memcached restart && \
groupadd -r $user && \
useradd -m -r -g $user $user && \
python3 -m pip install -U py4web
useradd -m -r -g $user $user

USER $user
WORKDIR /home/$user/

RUN cd /home/$user/ && py4web setup --yes apps
RUN python3 -m venv venv && \
. venv/bin/activate && \
pip install -U py4web && \
py4web setup --yes apps

EXPOSE 8000

WORKDIR /home/$user/

CMD py4web run --password_file password.txt --host 0.0.0.0 --port 8000 apps
CMD . venv/bin/activate && py4web run --password_file password.txt --host 0.0.0.0 --port 8000 apps

0 comments on commit 8d97e75

Please sign in to comment.