Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save darkn3rd/792ef1356058667ddf91e63c13d7c047 to your computer and use it in GitHub Desktop.
Save darkn3rd/792ef1356058667ddf91e63c13d7c047 to your computer and use it in GitHub Desktop.
Ansible-Container vs. Debian Jessie
$ ansible-container --debug build
Project name is express
Initialized with params: {'purge_last': True, 'subcommand': 'build', 'engine_args': {'engine_name': 'docker', 'purge_last': True, 'subcommand': 'build', 'engine_args': {...}, 'base_path': '/Users/joaquinmenchaca/projarea/web-microframework/express', 'ansible_options': u'', 'flatten': False, 'kwargs': {'debug': True, 'subcommand': 'build', 'no_purge_last': True}, 'debug': True, 'rebuild': False, 'no_purge_last': True}, 'no_purge_last': True, 'ansible_options': u'', 'flatten': False, 'kwargs': {'debug': True, 'subcommand': 'build', 'no_purge_last': True}, 'debug': True, 'rebuild': False}
(Re)building the Ansible Container image.
Using temporary directory /var/folders/yk/6cp276m16_5f9q0m4s_8dfcr0000gp/T/tmptGFmYg...
Building Docker Engine context...
Rendered Jinja Template:
FROM python:2.7
# Add the dockerproject repo
RUN apt-get update -y && \
apt-get install -y apt-transport-https ca-certificates && \
echo "deb https://apt.dockerproject.org/repo debian-jessie main">/etc/apt/sources.list.d/docker.list && \
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \
apt-get update -y && \
apt-get install -y python-setuptools git python-pip docker-engine && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ADD hosts /etc/ansible/inventory/hosts
ADD ansible /ansible-tmp/
# RUN pip install -q --no-cache-dir 'ansible=='
RUN pip install -q --no-cache-dir -e git+https://github.com/ansible/ansible.git@devel#egg=ansible
RUN test '(! -f /ansible-tmp/requirements.txt)' || pip install --no-cache-dir -r /ansible-tmp/requirements.txt
RUN rm -rf /ansible-tmp/
VOLUME /src
Rendered Jinja Template:
[docker]
express ansible_host=ansible_express_1
Starting Docker build of Ansible Container image (please be patient)...
Cleaning up temporary directory /var/folders/yk/6cp276m16_5f9q0m4s_8dfcr0000gp/T/tmptGFmYg...
{"stream":"Step 1 : FROM python:2.7\n"}
{"stream":" ---\u003e a3b29970a425\n"}
{"stream":"Step 2 : RUN apt-get update -y \u0026\u0026 apt-get install -y apt-transport-https ca-certificates \u0026\u0026 echo \"deb https://apt.dockerproject.org/repo debian-jessie main\"\u003e/etc/apt/sources.list.d/docker.list \u0026\u0026 apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D \u0026\u0026 apt-get update -y \u0026\u0026 apt-get install -y python-setuptools git python-pip docker-engine \u0026\u0026 apt-get clean \u0026\u0026 rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*\n"}
{"stream":" ---\u003e Running in 992693778e6b\n"}
{"stream":"Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]\n"}
{"stream":"Ign http://httpredir.debian.org jessie InRelease\n"}
{"stream":"Get:2 http://httpredir.debian.org jessie-updates InRelease [142 kB]\n"}
{"stream":"Get:3 http://httpredir.debian.org jessie Release.gpg [2373 B]\n"}
{"stream":"Get:4 http://httpredir.debian.org jessie Release [148 kB]\n"}
{"stream":"Get:5 http://security.debian.org jessie/updates/main amd64 Packages [365 kB]\n"}
{"stream":"Get:6 http://httpredir.debian.org jessie-updates/main amd64 Packages [17.6 kB]\n"}
{"stream":"Get:7 http://httpredir.debian.org jessie/main amd64 Packages [9032 kB]\n"}
{"stream":"Fetched 9770 kB in 5s (1716 kB/s)\nReading package lists..."}
{"stream":"\n"}
{"stream":"Reading package lists..."}
{"stream":"\n"}
{"stream":"Building dependency tree..."}
{"stream":"\nReading state information..."}
{"stream":"\n"}
{"stream":"ca-certificates is already the newest version.\nThe following packages were automatically installed and are no longer required:\n gir1.2-freedesktop gir1.2-gdkpixbuf-2.0 gir1.2-glib-2.0 gir1.2-rsvg-2.0\n"}
{"stream":" libcairo-gobject2 libcairo-script-interpreter2 libcdt5 libcgraph6 libcroco3\n libdjvulibre-dev libelfg0 libexif-dev libexif12 libexpat1-dev\n"}
{"stream":" libfontconfig1-dev libfreetype6-dev libgd3 libgirepository-1.0-1\n libglib2.0-bin libgraphviz-dev libgvc6 libgvpr2 libice-dev libice6\n"}
{"stream":" libilmbase-dev libjasper-dev libjbig-dev libjs-excanvas libjs-jquery\n liblcms2-dev liblqr-1-0-dev liblzo2-2 libmagickcore-6-arch-config\n"}
{"stream":" libmagickcore-6-headers libmagickwand-6-headers libopenexr-dev libpathplan4\n libpcre3-dev libpcrecpp0 libpixman-1-dev libpthread-stubs0-dev librsvg2-2\n"}
{"stream":" librsvg2-common libsm-dev libsm6 libtiff5-dev libtiffxx5 libvpx1 libwmf-dev\n libx11-dev libxau-dev libxcb-render0-dev libxcb-shm0-dev libxcb1-dev\n"}
{"stream":" libxdmcp-dev libxdot4 libxext-dev libxpm4 libxrender-dev libxt-dev libxt6\n mime-support pkg-config x11-common x11proto-core-dev x11proto-input-dev\n"}
{"stream":" x11proto-kb-dev x11proto-render-dev x11proto-xext-dev xorg-sgml-doctools\n xtrans-dev\n"}
{"stream":"Use 'apt-get autoremove' to remove them.\n"}
{"stream":"The following NEW packages will be installed:\n apt-transport-https\n"}
{"stream":"0 upgraded, 1 newly installed, 0 to remove and 44 not upgraded.\nNeed to get 138 kB of archives.\nAfter this operation, 195 kB of additional disk space will be used.\nGet:1 http://httpredir.debian.org/debian/ jessie/main apt-transport-https amd64 1.0.9.8.3 [138 kB]\n"}
{"stream":"\u001b[91mdebconf: delaying package configuration, since apt-utils is not installed\n\u001b[0m"}
{"stream":"Fetched 138 kB in 0s (151 kB/s)\n"}
{"stream":"Selecting previously unselected package apt-transport-https.\r\n"}
{"stream":"(Reading database ... \r"}
{"stream":"(Reading database ... 5%\r(Reading database ... 10%\r"}
{"stream":"(Reading database ... 15%\r(Reading database ... 20%\r"}
{"stream":"(Reading database ... 25%\r(Reading database ... 30%\r"}
{"stream":"(Reading database ... 35%\r(Reading database ... 40%\r"}
{"stream":"(Reading database ... 45%\r(Reading database ... 50%\r"}
{"stream":"(Reading database ... 55%\r(Reading database ... 60%\r"}
{"stream":"(Reading database ... 65%\r(Reading database ... 70%\r"}
{"stream":"(Reading database ... 75%\r(Reading database ... 80%\r"}
{"stream":"(Reading database ... 85%\r(Reading database ... 90%\r"}
{"stream":"(Reading database ... 95%\r(Reading database ... 100%\r"}
{"stream":"(Reading database ... 18934 files and directories currently installed.)"}
{"stream":"\r\n"}
{"stream":"Preparing to unpack .../apt-transport-https_1.0.9.8.3_amd64.deb ...\r\n"}
{"stream":"Unpacking apt-transport-https (1.0.9.8.3) ...\r\n"}
{"stream":"Setting up apt-transport-https (1.0.9.8.3) ...\r\n"}
{"stream":"Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.qko43Hd5Lx --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D\n"}
{"stream":"\u001b[91mgpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net\n\u001b[0m"}
{"stream":"\u001b[91mgpg: key 2C52609D: public key \"Docker Release Tool (releasedocker) \u003cdocker@docker.com\u003e\" imported\n\u001b[0m"}
{"stream":"\u001b[91mgpg: Total number processed: 1\n\u001b[0m"}
{"stream":"\u001b[91mgpg: imported: 1\u001b[0m"}
{"stream":"\u001b[91m (RSA: 1)\n\u001b[0m"}
{"stream":"Hit http://security.debian.org jessie/updates InRelease\n"}
{"stream":"Get:1 https://apt.dockerproject.org debian-jessie InRelease [20.6 kB]\n"}
{"stream":"Ign http://httpredir.debian.org jessie InRelease\n"}
{"stream":"Get:2 http://security.debian.org jessie/updates/main amd64 Packages [365 kB]\n"}
{"stream":"Hit http://httpredir.debian.org jessie-updates InRelease\n"}
{"stream":"Hit http://httpredir.debian.org jessie Release.gpg\n"}
{"stream":"Hit http://httpredir.debian.org jessie Release\n"}
{"stream":"Get:3 https://apt.dockerproject.org debian-jessie/main amd64 Packages [4708 B]\n"}
{"stream":"Get:4 http://httpredir.debian.org jessie-updates/main amd64 Packages [17.6 kB]\n"}
{"stream":"Get:5 http://httpredir.debian.org jessie/main amd64 Packages [9032 kB]\n"}
{"stream":"Err http://httpredir.debian.org jessie/main amd64 Packages\n \n"}
{"stream":"Err http://httpredir.debian.org jessie/main amd64 Packages\n \n"}
{"stream":"Err http://httpredir.debian.org jessie/main amd64 Packages\n 404 Not Found [IP: 128.31.0.66 80]\n"}
{"stream":"Fetched 9439 kB in 6s (1477 kB/s)\n"}
{"stream":"\u001b[91mW: \u001b[0m"}
{"stream":"\u001b[91mFailed to fetch http://httpredir.debian.org/debian/dists/jessie/main/binary-amd64/Packages 404 Not Found [IP: 128.31.0.66 80]\n\n\u001b[0m"}
{"stream":"\u001b[91mE: \u001b[0m"}
{"stream":"\u001b[91mSome index files failed to download. They have been ignored, or old ones used instead.\n\u001b[0m"}
{"errorDetail":{"code":100,"message":"The command '/bin/sh -c apt-get update -y \u0026\u0026 apt-get install -y apt-transport-https ca-certificates \u0026\u0026 echo \"deb https://apt.dockerproject.org/repo debian-jessie main\"\u003e/etc/apt/sources.list.d/docker.list \u0026\u0026 apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D \u0026\u0026 apt-get update -y \u0026\u0026 apt-get install -y python-setuptools git python-pip docker-engine \u0026\u0026 apt-get clean \u0026\u0026 rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*' returned a non-zero code: 100"},"error":"The command '/bin/sh -c apt-get update -y \u0026\u0026 apt-get install -y apt-transport-https ca-certificates \u0026\u0026 echo \"deb https://apt.dockerproject.org/repo debian-jessie main\"\u003e/etc/apt/sources.list.d/docker.list \u0026\u0026 apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D \u0026\u0026 apt-get update -y \u0026\u0026 apt-get install -y python-setuptools git python-pip docker-engine \u0026\u0026 apt-get clean \u0026\u0026 rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*' returned a non-zero code: 100"}
No image with the name ansible-container-builder
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/ansible_container-0.1-py2.7.egg/container/cli.py", line 154, in commandline
getattr(engine, u'cmdrun_{}'.format(args.subcommand))(**vars(args))
File "/usr/local/lib/python2.7/site-packages/ansible_container-0.1-py2.7.egg/container/engine.py", line 248, in cmdrun_build
create_build_container(engine_obj, base_path)
File "/usr/local/lib/python2.7/site-packages/ansible_container-0.1-py2.7.egg/container/engine.py", line 352, in create_build_container
builder_img_id = container_engine_obj.get_builder_image_id()
File "/usr/local/lib/python2.7/site-packages/ansible_container-0.1-py2.7.egg/container/docker/engine.py", line 174, in get_builder_image_id
return self.get_image_id_by_tag(self.builder_container_img_tag)
File "/usr/local/lib/python2.7/site-packages/ansible_container-0.1-py2.7.egg/container/docker/engine.py", line 127, in get_image_id_by_tag
raise NameError('No image with the name %s' % name)
NameError: No image with the name ansible-container-builder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment