1
- {% if is_buildkit_enabled() %} # syntax=docker/dockerfile:1.4{% endif %}
1
+ # syntax=docker/dockerfile:1.4
2
2
# ##### Minimal image with base system requirements for most stages
3
3
FROM docker.io/ubuntu:20.04 as minimal
4
4
5
- RUN {% if is_buildkit_enabled() %} --mount=type=cache,target=/var/cache/apt,sharing=locked \
6
- --mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \
5
+ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
6
+ --mount=type=cache,target=/var/lib/apt,sharing=locked \
7
7
apt update && \
8
8
apt install -y curl git-core language-pack-en
9
9
@@ -28,8 +28,8 @@ COPY --from=checkout /openedx/ecommerce /
28
28
# ##### Install python and virtual environment
29
29
FROM minimal as python
30
30
31
- RUN {% if is_buildkit_enabled() %} --mount=type=cache,target=/var/cache/apt,sharing=locked \
32
- --mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \
31
+ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
32
+ --mount=type=cache,target=/var/lib/apt,sharing=locked \
33
33
apt update && \
34
34
apt install -y libmysqlclient-dev libssl-dev python3 python3-pip python3-venv
35
35
@@ -44,15 +44,15 @@ RUN mkdir /openedx/.cache
44
44
# Create python venv
45
45
RUN python3 -m venv /openedx/venv/
46
46
ENV PATH "/openedx/venv/bin:$PATH"
47
- RUN {% if is_buildkit_enabled() %} --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} {% endif %} pip install \
47
+ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} pip install \
48
48
# https://pypi.org/project/setuptools/
49
49
# https://pypi.org/project/pip/
50
50
# https://pypi.org/project/wheel/
51
- setuptools==67.7 .2 pip==23.1.2. wheel==0.40.0
51
+ setuptools==68.2 .2 pip==23.2.1 wheel==0.41.2
52
52
53
53
# Install a recent version of nodejs
54
54
# https://pypi.org/project/nodeenv
55
- RUN pip install nodeenv==1.7 .0
55
+ RUN pip install nodeenv==1.8 .0
56
56
RUN nodeenv /openedx/nodeenv --node=16.20.0 --prebuilt
57
57
ENV PATH /openedx/nodeenv/bin:${PATH}
58
58
@@ -62,21 +62,21 @@ WORKDIR /openedx/ecommerce
62
62
63
63
# Install npm, bower requirements
64
64
ARG NPM_REGISTRY='{{ NPM_REGISTRY }}'
65
- RUN {% if is_buildkit_enabled() %} --mount=type=cache,target=/openedx/.npm/,sharing=shared,uid=${APP_USER_ID} {% endif %} npm clean-install --verbose --no-audit --registry=$NPM_REGISTRY
66
- RUN {% if is_buildkit_enabled() %} --mount=type=cache,target=/openedx/.cache/bower,sharing=shared,uid=${APP_USER_ID} {% endif %}./ node_modules/.bin/bower install --allow-root
65
+ RUN --mount=type=cache,target=/openedx/.npm/,sharing=shared,uid=${APP_USER_ID} npm clean-install --verbose --no-audit --registry=$NPM_REGISTRY
66
+ RUN --mount=type=cache,target=/openedx/.cache/bower,sharing=shared,uid=${APP_USER_ID} node_modules/.bin/bower install --allow-root
67
67
68
68
# python requirements
69
- RUN {% if is_buildkit_enabled() %} --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} {% endif %} pip install -r requirements.txt
69
+ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} pip install -r requirements.txt
70
70
# https://pypi.org/project/uWSGI/
71
- RUN {% if is_buildkit_enabled() %} --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} {% endif %} pip install uwsgi==2.0.21
71
+ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} pip install uwsgi==2.0.21
72
72
73
73
# Install private requirements: this is useful for installing custom payment processors.
74
74
COPY --chown=app:app ./requirements/ /openedx/requirements
75
75
RUN cd /openedx/requirements/ \
76
76
&& touch ./private.txt \
77
77
&& pip install -r ./private.txt
78
78
79
- {% for extra_requirement in ECOMMERCE_EXTRA_PIP_REQUIREMENTS %}RUN {% if is_buildkit_enabled() %} --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} {% endif %} pip install '{{ extra_requirement }}'
79
+ {% for extra_requirement in ECOMMERCE_EXTRA_PIP_REQUIREMENTS %}RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} pip install '{{ extra_requirement }}'
80
80
{% endfor %}
81
81
82
82
{{ patch("ecommerce-dockerfile-pre-assets" ) }}
0 commit comments