Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bionicbuild image so we don't bundle two different pip version #104

Merged
merged 6 commits into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from 4 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
11 changes: 5 additions & 6 deletions packagingbuild/bionic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,21 @@ RUN echo -e "#!/bin/sh\nexit 101\n" > /usr/sbin/policy-rc.d && \
# install python development
RUN apt-get update && \
apt-get -y install build-essential \
python python-virtualenv \
python3 python3-virtualenv python3-pip
python3-dev python3

RUN apt-get update && \
apt-get -y install \
devscripts debhelper dh-make libldap2-dev libsasl2-dev && apt-get clean

# Install fresh pip and co
RUN curl https://bootstrap.pypa.io/get-pip.py | python3 - virtualenv==16.6.0 pip==20.0.2 wheel setuptools cryptography; \
pip3 install --upgrade requests[security] && rm -rf /root/.cache
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6 - virtualenv==16.6.0 pip==20.0.2 wheel setuptools cryptography; \
pip3.6 install --upgrade requests[security] && rm -rf /root/.cache

# We use our dh-virtualenv version, since it fixes shebangd lines rewrites
RUN apt-get -y install \
python-setuptools python-mock && \
python-virtualenv python-setuptools python-mock && \
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious - why the move of python-virtualenv to here from earlier?

Copy link
Member Author

Choose a reason for hiding this comment

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

That was done to make Bionic Dockerfile more similar to the Xenial one.

In fact, first I made more changes so those Dockerfiles were almost the same (also added ppa for Python so we install same versions - right now on Xenial we install Python 3.6.12 and on Bionic we install Python 3.6.9, etc.), but then I decided to remove those changes to keep the diff smaller.

If people feel opinionated about it, I can add them back (they work fine as well).

apt-get clean && \
git clone -b stackstorm_patched https://github.com/stackstorm/dh-virtualenv.git /tmp/dh-virtualenv && \
git clone --branch stackstorm_patched_use_custom_pip https://github.com/StackStorm/dh-virtualenv.git /tmp/dh-virtualenv && \
cd /tmp/dh-virtualenv && \
dpkg-buildpackage -b -uc -us && dpkg -i ../dh-virtualenv_*.deb && \
rm -rf /tmp/dh-virtualenv*
Expand Down
2 changes: 1 addition & 1 deletion packagingbuild/xenial/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6 - virtualenv==16.6.0 p
RUN apt-get -y install \
python-virtualenv python-setuptools python-mock && \
apt-get clean && \
git clone -b stackstorm_patched https://github.com/stackstorm/dh-virtualenv.git /tmp/dh-virtualenv && \
git clone --branch stackstorm_patched_use_custom_pip https://github.com/StackStorm/dh-virtualenv.git /tmp/dh-virtualenv && \
cd /tmp/dh-virtualenv && \
dpkg-buildpackage -b -uc -us && dpkg -i ../dh-virtualenv_*.deb && \
rm -rf /tmp/dh-virtualenv*
Expand Down