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

Upgrade base image #12

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
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
27 changes: 22 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
FROM python:3.9-alpine3.12
FROM python:3.9-bookworm

COPY requirements.txt /opt/pluto-userbeacon/requirements.txt
WORKDIR /opt/pluto-userbeacon
RUN apk add --no-cache alpine-sdk linux-headers libffi libffi-dev openssl-dev && pip install -r requirements.txt && apk --no-cache del alpine-sdk linux-headers libffi-dev

# Update package list and install dependencies using apt-get
RUN apt-get update && apt-get install -y \
build-essential \
libffi-dev \
libssl-dev \
&& pip install -r requirements.txt \
&& apt-get remove -y \
build-essential \
libffi-dev \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN pip install -r requirements.txt

ADD userbeacon /opt/pluto-userbeacon/userbeacon
ADD k8s_settings /opt/pluto-userbeacon/k8s_settings
#annoying, but until my Mac gets upgraded to support later Docker I can't use chown-in-copy :(

# The chown command remains unchanged
RUN chown -R nobody /opt/pluto-userbeacon

ENV PYTHONPATH=/opt/pluto-userbeacon
WORKDIR /opt/pluto-userbeacon

USER nobody
CMD uwsgi --http :9000 --enable-threads -L --module userbeacon.wsgi --buffer-size=8192
CMD uwsgi --http :9000 --enable-threads -L --module userbeacon.wsgi --buffer-size=8192

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Django==3.2.15
uWSGI==2.0.18
uWSGI==2.0.21
requests==2.25.1
PyJWT==2.4.0
cryptography==3.3.2
Expand Down
Loading