Skip to content

Commit

Permalink
Merge pull request #863 from kobotoolbox/fix-pip-git-issue
Browse files Browse the repository at this point in the history
Fix `RemoteNotFoundError` from `pip` at container startup
  • Loading branch information
noliveleger authored Feb 1, 2023
2 parents d79b0fd + c1aead2 commit bbf7e78
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ ENV VIRTUAL_ENV=/opt/venv \
KOBOCAT_SRC_DIR=/srv/src/kobocat \
TMP_DIR=/srv/tmp

# Install `pip` packages
RUN python3 -m venv "$VIRTUAL_ENV"
RUN python -m venv "$VIRTUAL_ENV"
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --quiet pip==22.0.4 && \
pip install --quiet pip-tools
RUN pip install --quiet pip-tools==6.\*
COPY ./dependencies/pip/requirements.txt "${TMP_DIR}/pip_dependencies.txt"
RUN pip-sync "${TMP_DIR}/pip_dependencies.txt" 1>/dev/null

Expand Down Expand Up @@ -103,7 +101,6 @@ RUN chown -R ":${UWSGI_GROUP}" ${CELERY_PID_DIR} && \
chown -R "${UWSGI_USER}:${UWSGI_GROUP}" ${KOBOCAT_SRC_DIR}/emails/ && \
chown -R "${UWSGI_USER}:${UWSGI_GROUP}" ${KOBOCAT_LOGS_DIR} && \
chown -R "${UWSGI_USER}:${UWSGI_GROUP}" ${TMP_DIR} && \
chown -R "${UWSGI_USER}:${UWSGI_GROUP}" ${VIRTUAL_ENV} && \
chown -R "${UWSGI_USER}:${UWSGI_GROUP}" ${BACKUPS_DIR}

WORKDIR "${KOBOCAT_SRC_DIR}"
Expand Down

0 comments on commit bbf7e78

Please sign in to comment.