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

Update dockerfile to support newer Ubuntu distributions #953

Merged
merged 1 commit into from
Feb 17, 2025
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
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
Loading