dockcross/common.docker
Matt McCormick 7dd41cdc4b common: work around overlay storage backend pip uninstall
Addresses:

  Collecting pip
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
Collecting wheel
  Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
Installing collected packages: pip, wheel
  Found existing installation: pip 1.5.6
    Uninstalling pip-1.5.6:
Exception:
Traceback (most recent call last):
  File "/tmp/tmpqu31Wp/pip.zip/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/tmp/tmpqu31Wp/pip.zip/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/tmp/tmpqu31Wp/pip.zip/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/tmp/tmpqu31Wp/pip.zip/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/usr/lib/python2.7/shutil.py", line 300, in move
    rmtree(src)
  File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "/usr/lib/python2.7/shutil.py", line 256, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/lib/python2.7/shutil.py", line 254, in rmtree
    os.rmdir(path)
  OSError: [Errno 39] Directory not empty: '/usr/lib/python2.7/dist-packages/pip/backwardcompat'

when Docker is using the overlay fs backend. See:

  https://github.com/moby/moby/issues/12327
2017-06-10 17:40:36 -04:00

46 lines
1.6 KiB
Docker

WORKDIR /usr/share
RUN git clone "https://github.com/nojhan/liquidprompt.git" && \
cd liquidprompt && \
git checkout v_1.11
COPY imagefiles/.bashrc /root/
WORKDIR /usr/src
COPY imagefiles/install-openssl.sh imagefiles/install-cmake.sh /dockcross/
RUN \
if [ "$DEFAULT_DOCKCROSS_IMAGE" = "dockcross/manylinux-x86" ]; then \
/dockcross/install-openssl.sh -32 && \
/dockcross/install-cmake.sh -32 || exit 1; \
else \
/dockcross/install-openssl.sh && \
/dockcross/install-cmake.sh || exit 1; \
fi; \
rm /dockcross/install-openssl.sh /dockcross/install-cmake.sh
COPY imagefiles/cmake.sh /usr/local/bin/cmake
COPY imagefiles/ccmake.sh /usr/local/bin/ccmake
# /opt/rh/devtoolset-2/root/usr/bin/sudo expects sudo at this location
COPY imagefiles/sudo.sh /usr/bin/sudo
COPY imagefiles/install-ninja.sh /dockcross/
RUN \
/dockcross/install-ninja.sh \
-python $([ -e /opt/python/cp35-cp35m/bin/python ] && echo "/opt/python/cp35-cp35m/bin/python" || echo "python") && \
rm /dockcross/install-ninja.sh
RUN if [ -e /opt/python/cp35-cp35m/bin/python ]; then \
: nothing to do here since it is updated by manylinux-common/install-python-packages.sh ; \
else \
wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py --ignore-installed && \
rm get-pip.py || exit 1; \
fi
RUN $([ -e /opt/python/cp35-cp35m/bin/python ] && echo "/opt/python/cp35-cp35m/bin/python" || echo "python") -m pip install --ignore-installed conan
RUN echo "root:root" | chpasswd
WORKDIR /work
ENTRYPOINT ["/dockcross/entrypoint.sh"]
COPY imagefiles/entrypoint.sh imagefiles/dockcross /dockcross/