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

feat: ubuntu upgrade in dockerfile #84

Open
wants to merge 1 commit into
base: nightly
Choose a base branch
from
Open
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
26 changes: 13 additions & 13 deletions tutordiscovery/templates/discovery/build/discovery/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# syntax=docker/dockerfile:1.4
###### Minimal image with base system requirements for most stages
FROM docker.io/ubuntu:20.04 AS minimal
FROM docker.io/ubuntu:24.04 AS minimal

ENV DEBIAN_FRONTEND=noninteractive
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update && \
apt install -y curl git-core gettext language-pack-en \
build-essential libcairo2 libffi-dev libmysqlclient-dev libxml2-dev libxslt-dev libjpeg-dev libssl-dev \
pkg-config libsqlite3-dev mime-support
pkg-config libsqlite3-dev media-types mailcap
ENV LC_ALL=en_US.UTF-8

ARG APP_USER_ID=1000
ARG APP_USER_ID=1001
RUN if [ "$APP_USER_ID" = 0 ]; then echo "app user may not be root" && false; fi
RUN useradd --home-dir /openedx --create-home --shell /bin/bash --uid ${APP_USER_ID} app
USER ${APP_USER_ID}
Expand Down Expand Up @@ -91,13 +91,13 @@ RUN mkdir course_discovery/media
# Run production server
ENV DJANGO_SETTINGS_MODULE=course_discovery.settings.tutor.production
EXPOSE 8000
CMD uwsgi \
--static-map /static=/openedx/discovery/course_discovery/assets \
--static-map /media=/openedx/discovery/course_discovery/media \
--http 0.0.0.0:8000 \
--thunder-lock \
--single-interpreter \
--enable-threads \
--processes=2 \
--buffer-size=8192 \
--wsgi-file course_discovery/wsgi.py
CMD ["uwsgi", \
"--static-map", "/static=/openedx/discovery/course_discovery/assets", \
"--static-map", "/media=/openedx/discovery/course_discovery/media", \
"--http", "0.0.0.0:8000", \
"--thunder-lock", \
"--single-interpreter", \
"--enable-threads", \
"--processes=${UWSGI_WORKERS:-2}", \
"--buffer-size=8192", \
"--wsgi-file", "course_discovery/wsgi.py"]