add dependencies from personal repo
This commit is contained in:
@@ -13,13 +13,19 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
# dependencies for building Python packages
|
||||
build-essential \
|
||||
# psycopg2 dependencies
|
||||
libpq-dev
|
||||
libpq-dev \
|
||||
# git
|
||||
git \
|
||||
# ssh
|
||||
openssh-client
|
||||
|
||||
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan home.ascorrea.com >> ~/.ssh/known_hosts
|
||||
|
||||
# Requirements are installed here to ensure they will be cached.
|
||||
COPY ./requirements .
|
||||
|
||||
# Create Python Dependency and Sub-Dependency Wheels.
|
||||
RUN pip wheel --wheel-dir /usr/src/app/wheels \
|
||||
RUN --mount=type=ssh,id=git_ssh_key pip wheel --wheel-dir /usr/src/app/wheels \
|
||||
-r ${BUILD_ENVIRONMENT}.txt
|
||||
|
||||
|
||||
@@ -41,16 +47,22 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
libpq-dev \
|
||||
# Translations dependencies
|
||||
gettext \
|
||||
# cleaning up unused files
|
||||
# ssh
|
||||
openssh-client \
|
||||
#git
|
||||
git \
|
||||
# cleaning up unused files
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan home.ascorrea.com >> ~/.ssh/known_hosts
|
||||
|
||||
# All absolute dir copies ignore workdir instruction. All relative dir copies are wrt to the workdir instruction
|
||||
# copy python dependency wheels from python-build-stage
|
||||
COPY --from=python-build-stage /usr/src/app/wheels /wheels/
|
||||
|
||||
# use wheels to install python dependencies
|
||||
RUN pip install --no-cache-dir --no-index --find-links=/wheels/ /wheels/* \
|
||||
RUN --mount=type=ssh,id=git_ssh_key pip install --no-cache-dir --no-index --find-links=/wheels/ /wheels/* \
|
||||
&& rm -rf /wheels/
|
||||
|
||||
COPY ./compose/production/django/entrypoint /entrypoint
|
||||
|
||||
@@ -14,15 +14,19 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
build-essential \
|
||||
# psycopg2 dependencies
|
||||
libpq-dev \
|
||||
# cleaning up unused files
|
||||
git \
|
||||
openssh-client \
|
||||
# cleaning up unused files
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Requirements are installed here to ensure they will be cached.
|
||||
COPY ./requirements /requirements
|
||||
|
||||
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan home.ascorrea.com >> ~/.ssh/known_hosts
|
||||
|
||||
# create python dependency wheels
|
||||
RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels \
|
||||
RUN --mount=type=ssh,id=git_ssh_key pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels \
|
||||
-r /requirements/local.txt -r /requirements/production.txt \
|
||||
&& rm -rf /requirements
|
||||
|
||||
|
||||
Reference in New Issue
Block a user