We do not package ansible in docker containers.  There may be unofficial
containers, but nothing official.

Doing so is easy enough though, and I do it for a personal project, you can
see a Dockerfile at
https://github.com/sivel/ansible-template-ui/blob/master/docker/devel/Dockerfile
for building it.

My linked Dockerfile is also built to work with alpine.

On Thu, Feb 8, 2018 at 6:41 AM, DK <desmond.kirr...@gmail.com> wrote:

> Hi,
>
> I'm looking for a Docker image to run some playbook and roles with the
> latest Ansible version?
>
> I tried build my own but I'm not a python user.
>
> FROM python:3.6.4-alpine3.7
>
> RUN apk --update add git
>
> WORKDIR /opt
> RUN git clone https://github.com/ansible/ansible.git --recursive
> WORKDIR /opt/ansible
> RUN sh -c 'source ./hacking/env-setup'
> RUN pip install -r ./requirements.txt
>
> WORKDIR /
> # RUN ansible --version
>
> CMD ["sh"]
>
>
>
>
> Getting the following with pip install -r ./requirements.txt
>
>
> Collecting pynacl>=1.0.1 (from paramiko->-r ./requirements.txt (line 8))
>
>   Downloading PyNaCl-1.2.1.tar.gz (3.3MB)
>
>     Complete output from command python setup.py egg_info:
>
>
>         No working compiler found, or bogus compiler options passed to
>
>         the compiler from Python's standard "distutils" module.  See
>
>         the error messages above.  Likely, the problem is not related
>
>         to CFFI but generic to the setup.py of any Python package that
>
>         tries to compile C code.  (Hints: on OS/X 10.8, for errors about
>
>         -mno-fused-madd see http://stackoverflow.com/questions/22313407/
>
>         Otherwise, see https://wiki.python.org/moin/CompLangPython or
>
>         the IRC channel #python on irc.freenode.net.)
>
>     Traceback (most recent call last):
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 154, in save_modules
>
>         yield saved
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 195, in setup_context
>
>         yield
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 250, in run_setup
>
>         _execfile(setup_script, ns)
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 45, in _execfile
>
>         exec(code, globals, locals)
>
>       File "/tmp/easy_install-qy44slie/cffi-1.11.4/setup.py", line 138,
> in <module>
>
>         try:
>
>       File "/tmp/easy_install-qy44slie/cffi-1.11.4/setup.py", line 73, in
> ask_supports_thread
>
>         import nacl # flake8: noqa
>
>       File "/tmp/easy_install-qy44slie/cffi-1.11.4/setup.py", line 55, in
> no_working_compiler_found
>
>         requirements.append("cffi>=1.4.1")
>
>     SystemExit: 1
>
>
>     During handling of the above exception, another exception occurred:
>
>
>     Traceback (most recent call last):
>
>       File 
> "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py",
> line 1136, in run_setup
>
>         run_setup(setup_script, args)
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 253, in run_setup
>
>         raise
>
>       File "/usr/local/lib/python3.6/contextlib.py", line 99, in __exit__
>
>         self.gen.throw(type, value, traceback)
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 195, in setup_context
>
>         yield
>
>       File "/usr/local/lib/python3.6/contextlib.py", line 99, in __exit__
>
>         self.gen.throw(type, value, traceback)
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 166, in save_modules
>
>         saved_exc.resume()
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 141, in resume
>
>         six.reraise(type, exc, self._tb)
>
>       File 
> "/usr/local/lib/python3.6/site-packages/pkg_resources/_vendor/six.py",
> line 685, in reraise
>
>         raise value.with_traceback(tb)
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 154, in save_modules
>
>         yield saved
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 195, in setup_context
>
>         yield
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 250, in run_setup
>
>         _execfile(setup_script, ns)
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py",
> line 45, in _execfile
>
>         exec(code, globals, locals)
>
>       File "/tmp/easy_install-qy44slie/cffi-1.11.4/setup.py", line 138,
> in <module>
>
>         try:
>
>       File "/tmp/easy_install-qy44slie/cffi-1.11.4/setup.py", line 73, in
> ask_supports_thread
>
>         import nacl # flake8: noqa
>
>       File "/tmp/easy_install-qy44slie/cffi-1.11.4/setup.py", line 55, in
> no_working_compiler_found
>
>         requirements.append("cffi>=1.4.1")
>
>     SystemExit: 1
>
>
>     During handling of the above exception, another exception occurred:
>
>
>     Traceback (most recent call last):
>
>       File "<string>", line 1, in <module>
>
>       File "/tmp/pip-build-osfe9jfx/pynacl/setup.py", line 251, in
> <module>
>
>         "Programming Language :: Python :: 3.6",
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py",
> line 128, in setup
>
>         _install_setup_requires(attrs)
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py",
> line 123, in _install_setup_requires
>
>         dist.fetch_build_eggs(dist.setup_requires)
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/dist.py",
> line 461, in fetch_build_eggs
>
>         replace_conflicting=True,
>
>       File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py",
> line 866, in resolve
>
>         replace_conflicting=replace_conflicting
>
>       File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py",
> line 1146, in best_match
>
>         return self.obtain(req, installer)
>
>       File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py",
> line 1158, in obtain
>
>         return installer(requirement)
>
>       File "/usr/local/lib/python3.6/site-packages/setuptools/dist.py",
> line 528, in fetch_build_egg
>
>         return cmd.easy_install(req)
>
>       File 
> "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py",
> line 673, in easy_install
>
>         return self.install_item(spec, dist.location, tmpdir, deps)
>
>       File 
> "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py",
> line 699, in install_item
>
>         dists = self.install_eggs(spec, download, tmpdir)
>
>       File 
> "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py",
> line 882, in install_eggs
>
>         return self.build_and_install(setup_script, setup_base)
>
>       File 
> "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py",
> line 1150, in build_and_install
>
>         self.run_setup(setup_script, setup_base, args)
>
>       File 
> "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py",
> line 1138, in run_setup
>
>         raise DistutilsError("Setup script exited with %s" % (v.args[0],))
>
>     distutils.errors.DistutilsError: Setup script exited with 1
>
>
>     ----------------------------------------
>
> Command "python setup.py egg_info" failed with error code 1 in
> /tmp/pip-build-osfe9jfx/pynacl/
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-devel+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to