Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions rootfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/deis/base:0.3.1
FROM quay.io/deis/base:v0.3.4

RUN adduser --system \
--shell /bin/bash \
Expand All @@ -9,21 +9,39 @@ RUN adduser --system \

COPY requirements.txt /app/requirements.txt

RUN buildDeps='gcc git libffi-dev libpq-dev python3-dev'; \
RUN buildDeps='gcc git libffi-dev libpq-dev python3-dev python3-pip python3-wheel python3-setuptools'; \
apt-get update && \
apt-get install -y --no-install-recommends \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you prefix this with DEBIAN_FRONTEND=noninteractive? The warnings from apt-get are distracting.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you point me to where it is warning you off that?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have logs handy, so just ignore me. It's a pervasive issue that isn't strictly in scope for this PR, so let's fix it later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I asked because I haven't found it in the e2e building phase but I have seen it in chef and such before. Depends if the env in ubuntu-slim isn't doing its job

$buildDeps \
sudo \
libpq5 \
python3 \
sudo && \
python3-minimal \
# cryptography package needs pkg_resources
python3-pkg-resources && \
ln -s /usr/bin/python3 /usr/bin/python && \
curl -sSL https://bootstrap.pypa.io/get-pip.py | python - pip==8.1.2 && \
mkdir -p /configs && chown -R deis:deis /configs && \
pip install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt && \
rm -rf /root/.cache/pip/* && \
pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt && \
# cleanup
apt-get purge -y --auto-remove $buildDeps && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc
apt-get autoremove -y && \
apt-get clean -y && \
# package up license files if any by appending to existing tar
COPYRIGHT_TAR='/usr/share/copyrights.tar'; \
gunzip $COPYRIGHT_TAR.gz; tar -rf $COPYRIGHT_TAR /usr/share/doc/*/copyright; gzip $COPYRIGHT_TAR && \
rm -rf \
/usr/share/doc \
/usr/share/man \
/usr/share/info \
/usr/share/locale \
/var/lib/apt/lists/* \
/var/log/* \
/var/cache/debconf/* \
/etc/systemd \
/lib/lsb \
/lib/udev \
/usr/lib/x86_64-linux-gnu/gconv/IBM* \
/usr/lib/x86_64-linux-gnu/gconv/EBC* && \
bash -c "mkdir -p /usr/share/man/man{1..8}"

COPY . /app

Expand Down