There was a `requirements/pip.txt` with old versions, and a newer `requirements/edx/pip.txt` managed via a `pip.in` file. The old one was used in most places, but came out of sync with pip-tools.txt, which was managed properly. Eventually this caused a `pip check` failure due to the mismatch. This should resolve at least part of https://github.com/edx/edx-arch-experiments/issues/267 This PR moves pip.in and pip-tools.in and their corresponding pin files up to the `requirements/` dir, since they should be shared between the edx and sandbox environments. This also has the effect of upgrading pip to match the version in the file we've been uselessly upgrading. Other improvements: - Remove `-q` option from pip and pip-sync calls, as it was hiding some debugging information that would have resolved this sooner. - Depend on `pre-requirements` from `compile-requirements`, rather than from `upgrade`. (The base target is the one that actually needs it.) This also lets us remove the explicit `pip install pip-tools` line. - Install the recompiled pip and pip-tools files right away, not after the loop. When we upgrade pip-tools, we want to use the upgraded version, not the previous version. This requires moving the pip-tools.txt recompilation outside of the loop and into its own explicit line. - Don't upgrade pip if we're not running `make upgrade` (respect the compile options). - Remove apparently-unneeded `--no-emit-trusted-host --no-emit-index-url` options (we don't pass trusted-host or index-url options).
61 lines
1.8 KiB
Docker
61 lines
1.8 KiB
Docker
FROM summerwind/actions-runner:v2.288.1-ubuntu-20.04-c221b6e as base
|
|
|
|
USER root
|
|
|
|
# Install system requirements
|
|
RUN apt-get update && \
|
|
# Global requirements
|
|
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
|
build-essential git language-pack-en libmysqlclient-dev libssl-dev libxml2-dev \
|
|
libxmlsec1-dev libxslt1-dev \
|
|
# lynx: Required by https://github.com/openedx/edx-platform/blob/b489a4ecb122/openedx/core/lib/html_to_text.py#L16
|
|
lynx xvfb pkg-config \
|
|
python3-dev python3-venv \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Mongodb 4.4
|
|
RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add -
|
|
RUN echo "deb https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list
|
|
RUN apt-get update && apt-get install -y mongodb-org=4.4.13
|
|
EXPOSE 27017
|
|
|
|
RUN locale-gen en_US.UTF-8
|
|
ENV LANG en_US.UTF-8
|
|
ENV LANGUAGE en_US:en
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
WORKDIR /edx/app/edxapp/edx-platform
|
|
|
|
ENV PATH /edx/app/edxapp/nodeenv/bin:${PATH}
|
|
ENV PATH ./node_modules/.bin:${PATH}
|
|
ENV CONFIG_ROOT /edx/etc/
|
|
ENV PATH /edx/app/edxapp/edx-platform/bin:${PATH}
|
|
ENV SETTINGS production
|
|
RUN mkdir -p /edx/etc/
|
|
|
|
ENV VIRTUAL_ENV=/edx/app/edxapp/venvs/edxapp
|
|
RUN python3.8 -m venv $VIRTUAL_ENV
|
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
|
|
|
|
FROM base as build
|
|
|
|
# Install Python requirements
|
|
COPY setup.py setup.py
|
|
COPY openedx/core/lib openedx/core/lib
|
|
COPY lms lms
|
|
COPY cms cms
|
|
COPY requirements/pip.txt requirements/pip.txt
|
|
COPY requirements/pip-tools.txt requirements/pip-tools.txt
|
|
COPY requirements/edx/testing.txt requirements/edx/testing.txt
|
|
COPY Makefile Makefile
|
|
RUN make test-requirements
|
|
|
|
FROM base as runner
|
|
|
|
COPY --from=build /edx/app/edxapp/venvs/edxapp /edx/app/edxapp/venvs/edxapp
|
|
|
|
USER runner
|
|
|
|
CMD ["/entrypoint.sh"]
|