Sign inSign up

lj020326/ansible-runner

By lj020326

•Updated about 7 hours ago

Ansible runtime environment in a Docker container preloaded with commonly used galaxy collections.

Image
Languages & frameworks
Integration & delivery
Developer tools
0

100K+

lj020326/ansible-runner repository overview

Docker images build License

⁠docker-ansible-runner

Ansible runtime environment in a Docker container preloaded with commonly used galaxy collections.

The ansible enabled docker image used in examples here can be found on dockerhub⁠.

Running Ansible in Docker makes a lot of sense: its super quick to get going, and you can just expose the ports needed to access via the web interface. But it also makes sense to run your ansible playbooks inside Docker as well: its compartmentalised, with full control of the environment inside.

⁠Status

GitHub issues GitHub stars Docker Pulls - lj020326/ansible-runner

⁠Docker in Docker

It's possible to run into some problems with Docker running inside another Docker container (more info here⁠). A better approach is that a container does not run its own Docker daemon, but connects to the Docker daemon of the host system. That means, you will have a Docker CLI in the container, as well as on the host system, but they both connect to one and the same Docker daemon. At any time, there is only one Docker daemon running in your machine, the one running on the host system. This article⁠ really helped me understand this. To do this, you just bind mount to the host system daemon, using this argument when you run Docker: -v /var/run/docker.sock:/var/run/docker.sock

⁠Running the container

The easiest way is to pull from Docker Hub:

$ docker run -it -p 8080:8080 -p 50000:50000 \
    -v ansible_home:/var/ansible_home \
    -v /var/run/docker.sock:/var/run/docker.sock \
    --restart unless-stopped \
    lj020326/ansible-runner

If running on an internal host with trusted ca certs:

$ docker run -it -p 8080:8080 -p 50000:50000 \
    -v ansible_home:/var/ansible_home \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro \
    --restart unless-stopped \
    lj020326/ansible-runner

Alternatively, you can clone this repository, build the image from the Dockerfile, and then run the container

$ docker build -t ansible-runner .

$ docker run -it -p 8080:8080 -p 50000:50000 \
    -v ansible_home:/var/ansible_home \
    -v /var/run/docker.sock:/var/run/docker.sock \
    --restart unless-stopped \
    ansible-runner

⁠Contact

Linkedin

Tag summary

Content type

Image

Digest

sha256:2ea30f2a4…

Size

511.5 MB

Last updated

about 7 hours ago

docker pull lj020326/ansible-runner:20261006