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

Unable to build Dockerfile #1725

Closed
romsnl opened this issue Feb 5, 2019 · 10 comments
Closed

Unable to build Dockerfile #1725

romsnl opened this issue Feb 5, 2019 · 10 comments
Labels

Comments

@romsnl
Copy link

romsnl commented Feb 5, 2019

Issue Type

  • Bug report

Unable to build Molecule Dockerfile

Desired Behavior

Build the Docker Image, install the python packages list with pip

ENV PACKAGES="
gcc
make
bash
shadow
libffi-dev
musl-dev
openssl-dev
py-pip
python
python-dev
linux-headers
sudo
rsync
curl
ruby
ruby-dev
ruby-etc
ruby-rdoc
ruby-irb
git
"

Actual Behaviour

Fails in pip install stage pip install --no-cache-dir ${PIP_PACKAGES}

Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 176, in main
status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 346, in run
session=session, autobuilding=True
File "/usr/lib/python2.7/site-packages/pip/_internal/wheel.py", line 886, in build
assert have_directory_for_build
AssertionError
The command '/bin/sh -c apk update && apk add --update --no-cache ${PACKAGES} && rm -rf /var/cache/apk/* && pip install --upgrade pip && pip install --no-cache-dir ${PIP_PACKAGES} && rm -rf /root/.cache && gem install ${GEM_PACKAGES} && adduser -D -h ${TEST_HOME_DIR} ${TEST_USER} && usermod -aG dockremap ${TEST_USER} && echo "${TEST_USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers' returned a non-zero code: 2

@romsnl
Copy link
Author

romsnl commented Feb 6, 2019

Potentially related to: pypa/pip#6197

@decentral1se
Copy link
Contributor

@GLcx, any ideas on a fix? Thanks for the solid detective work.

@romsnl
Copy link
Author

romsnl commented Feb 6, 2019

@lwm One of the fix would be to use "--no-use-pep517" -> && pip install --no-cache-dir --no-use-pep517 -r ${PIP_PACKAGES} \

A new version of pip will be released with the fix. (Anytime soon) so it's probably not needed unless we have a new molecule release coming.

@themr0c
Copy link
Contributor

themr0c commented Feb 6, 2019

Did you try to build from the master branch ?
In that branch the Dockerfile is referencing ENV PIP_PACKAGES="molecule[azure,docker,docs,ec2,gce,lxc,openstack,vagrant,windows] virtualenv "
But the new pip package has not been released yet, and it is necessary because it will include all the extras ([azure,docker,docs,ec2,gce,lxc,openstack,vagrant,windows]) that are not present in the 2.19 pip package.

@themr0c
Copy link
Contributor

themr0c commented Feb 6, 2019

Actually, you should have these errors in the logs, previous to the python failure:

  molecule 2.19.0 does not provide the extra 'azure'
  molecule 2.19.0 does not provide the extra 'docker'
  molecule 2.19.0 does not provide the extra 'docs'
  molecule 2.19.0 does not provide the extra 'ec2'
  molecule 2.19.0 does not provide the extra 'gce'
  molecule 2.19.0 does not provide the extra 'lxc'
  molecule 2.19.0 does not provide the extra 'openstack'
  molecule 2.19.0 does not provide the extra 'vagrant'
  molecule 2.19.0 does not provide the extra 'windows'

@ssbarnea
Copy link
Member

ssbarnea commented Feb 6, 2019

True this is caused by the fact that documentation is on master and not on last release. Things like calling as python module and extras are not working with last release but they work with master. Another reason to release more often.

@decentral1se
Copy link
Contributor

OK, great, thanks for clearing up. Let's keep this open to track until we make the next release.

@decentral1se decentral1se added this to the v2.20 milestone Feb 7, 2019
@romsnl
Copy link
Author

romsnl commented Feb 11, 2019

pip 19.0.2 released. Original issue is now fixed.

@decentral1se
Copy link
Contributor

Thank you @GLcx!

@gundalow
Copy link
Contributor

Original issue is fixed, so closing.
If there are other problems please raise individual issues for those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants