Skip to content

chusiang/ansible.dockerfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker image: Ansible

GitHub OS

A Docker image for run the Ansible Engine on Alpine Linux.

Docker hub

Supported tags and respective Dockerfile links

Note: ansible current version is v11.7.0 (ansible-core v2.18.6). Please see the "Releases and maintenance | Ansible Documentation".

Build image

  1. Get this project.

    [ chusiang@workstation ~ ]
    $ git clone https://github.com/chusiang/ansible.dockerfile.git
  2. Go to workspace.

    [ chusiang@workstation ~ ]
    $ cd ansible.dockerfile/<REVERSION>
  3. Bunild the image.

    [ chusiang@workstation ~ ]
    $ docker build -t ansible .
    
    [ chusiang@workstation ~ ]
    $ docker build -t ansible:<REVERSION> .

Run container

  1. Get image.

    [ chusiang@workstation ~ ]
    $ docker pull chusiang/ansible
  2. Run container with bash shell.

    [ chusiang@workstation ~ ]
    $ docker run --name ansible -it chusiang/ansible bash
    5e9dd71fbf02:~$
  3. Enter exist container with command line.

    [ chusiang@workstation ~ ]
    $ docker exec -it ansible bash
    5e9dd71fbf02:~$ whoami
    ansibull

    Default not use root user after chusiang/ansible:8 for security.

  4. Check container process.

    [ chusiang@workstation ~ ]
    $ docker ps

Enjoy it !

History

2025

  • 07/13 Add 11 image, the Ansible v11.0.0 release at Nov 20, 2024.
  • 07/13 Add 10 image, the Ansible v10.0.1 release at Jun 6, 2024.
  • 07/13 Add 9 image, the Ansible v9.0.1 release at Nov 22, 2023.
  • 07/12 Add 8 image by multi-stage builds, the Ansible v8.0.0 release at May 31, 2023.

2022

  • 11/24 Add 7 image, the Ansible v7.0.0 release at Nov 23, 2022.
  • 11/24 Add 6 image, the Ansible v6.0.0 release at Jun 22, 2022.
  • 11/24 Add 5 image, the Ansible v5.0.1 release at Dec 3, 2021.
  • 11/24 Stop maintian 2.10 image and remove it, please use 3 image.

2021

  • 07/11: Refactor the 2.9 Dockerfile with Python 3, and switch latest tag to 2.9.
  • 07/09: Add 4 image, the Ansible v4.0.0 release at May 18 2021.
  • 07/09: Add 3 image, the Ansible v3.0.0 release at Feb 16 2021.
  • 07/09: Add 2.10 image, the Ansible v2.10.0 release at Aug 14 2020.

2020

  • 03/03 Add ONBUILD rule for copy current directory to /srv/.

2019

  • 12/09: Refactor "Update the CA certificates" part for fixed "wget: error getting response: Connection reset by peer" problem. (REF)
  • 11/14: Add 2.9 image, the Ansible v2.9.0 release at Oct 31 2019, and add install py-netaddr package.
  • 07/04: Add 2.8 image, the Ansible v2.8.0 release at May 17 2019, and remove install the vim.

2018

License

MIT license from 2017-2025.

Author Information

  1. Chu-Siang Lai