-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd533f0
commit c471070
Showing
7 changed files
with
32 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "16.1.0" | ||
__version__ = "17.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{% if is_buildkit_enabled() %}# syntax=docker/dockerfile:1.4{% endif %} | ||
# syntax=docker/dockerfile:1 | ||
###### Minimal image with base system requirements for most stages | ||
FROM docker.io/ubuntu:20.04 as minimal | ||
LABEL maintainer="Lawrence McDaniel <[email protected]>" | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \ | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
apt update && \ | ||
apt install -y build-essential curl git language-pack-en | ||
|
||
|
@@ -16,18 +16,18 @@ ENV LC_ALL en_US.UTF-8 | |
###### Install python with pyenv in /opt/pyenv and create virtualenv in /openedx/venv | ||
FROM minimal as python | ||
# https://github.com/pyenv/pyenv/wiki/Common-build-problems#prerequisites | ||
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked {% endif %}apt update && \ | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked apt update && \ | ||
apt install -y libssl-dev zlib1g-dev libbz2-dev \ | ||
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | ||
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git | ||
|
||
# Install pyenv | ||
# https://www.python.org/downloads/ | ||
# https://github.com/pyenv/pyenv/releases | ||
ARG PYTHON_VERSION=3.8.15 | ||
ARG PYTHON_VERSION=3.8.18 | ||
ENV PYENV_ROOT /opt/pyenv | ||
RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.17 --depth 1 | ||
RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.29 --depth 1 | ||
|
||
# Install Python | ||
RUN $PYENV_ROOT/bin/pyenv install $PYTHON_VERSION | ||
|
@@ -39,8 +39,8 @@ RUN $PYENV_ROOT/versions/$PYTHON_VERSION/bin/python -m venv /openedx/venv | |
FROM minimal as code | ||
ARG CREDENTIALS_REPOSITORY="{{ CREDENTIALS_REPOSITORY }}" | ||
ARG CREDENTIALS_VERSION="{{ CREDENTIALS_REPOSITORY_VERSION }}" | ||
RUN mkdir -p /openedx/credentials && \ | ||
git clone $CREDENTIALS_REPOSITORY --branch $CREDENTIALS_VERSION --depth 1 /openedx/credentials | ||
RUN mkdir -p /openedx/credentials | ||
ADD --keep-git-dir=true $CREDENTIALS_REPOSITORY#$CREDENTIALS_VERSION /openedx/credentials | ||
WORKDIR /openedx/credentials | ||
|
||
{{ patch("credentials-dockerfile-post-git-checkout") }} | ||
|
@@ -50,8 +50,8 @@ FROM python as python-requirements | |
ENV PATH /openedx/venv/bin:${PATH} | ||
ENV VIRTUAL_ENV /openedx/venv/ | ||
|
||
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked {% endif %}apt update \ | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked apt update \ | ||
&& apt install -y software-properties-common libmysqlclient-dev libxmlsec1-dev | ||
|
||
# Note that this means that we need to reinstall all requirements whenever there is a | ||
|
@@ -61,25 +61,25 @@ COPY --from=code /openedx/credentials /openedx/credentials | |
WORKDIR /openedx/credentials | ||
|
||
# Install the right version of pip/setuptools | ||
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install \ | ||
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \ | ||
# https://pypi.org/project/setuptools/ | ||
# https://pypi.org/project/pip/ | ||
# https://pypi.org/project/wheel/ | ||
setuptools==67.7.2 pip==23.1.2. wheel==0.40.0 | ||
setuptools==68.2.2 pip==23.2.1. wheel==0.41.2 | ||
|
||
# Install base requirements | ||
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install -r requirements/production.txt | ||
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install -r requirements/production.txt | ||
|
||
# Install extra requirements | ||
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install \ | ||
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \ | ||
# Use redis as a django cache https://pypi.org/project/django-redis/ | ||
django-redis==5.2.0 \ | ||
django-redis==5.4.0 \ | ||
# uwsgi server https://pypi.org/project/uWSGI/ | ||
uwsgi==2.0.21 | ||
uwsgi==2.0.22 | ||
|
||
{{ patch("credentials-dockerfile-post-python-requirements") }} | ||
|
||
{% for extra_requirement in CREDENTIALS_EXTRA_PIP_REQUIREMENTS %}RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install '{{ extra_requirement }}' | ||
{% for extra_requirement in CREDENTIALS_EXTRA_PIP_REQUIREMENTS %}RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install '{{ extra_requirement }}' | ||
{% endfor %} | ||
|
||
###### Install nodejs with nodeenv in /openedx/nodeenv | ||
|
@@ -95,14 +95,14 @@ RUN nodeenv /openedx/nodeenv --node=16.14.0 --prebuilt | |
ARG NPM_REGISTRY='{{ NPM_REGISTRY }}' | ||
COPY --from=code /openedx/credentials/package.json /openedx/credentials/package.json | ||
WORKDIR /openedx/credentials | ||
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.npm/,sharing=shared {% endif %}npm install --verbose --registry=$NPM_REGISTRY | ||
RUN --mount=type=cache,target=/openedx/.npm/,sharing=shared npm install --verbose --registry=$NPM_REGISTRY | ||
|
||
###### Production image with system and python requirements | ||
FROM minimal as production | ||
|
||
# Install system requirements | ||
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked {% endif %}apt update \ | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked apt update \ | ||
&& apt install -y libxml2 libmysqlclient-dev mime-support | ||
|
||
# From then on, run as unprivileged "app" user | ||
|