├── Dockerfile └── README.md /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.8.7-buster 2 | 3 | RUN apt-get update 4 | RUN apt-get install bash git openssh-client -y 5 | RUN pip3 install ansible==2.9.10 6 | RUN pip3 install boto3 boto -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Outlandish Docker ansible image 2 | 3 | Code that creates a docker image containing ansible and other necessary tools for deployment of Outlandish projects. 4 | 5 | Base docker image: python:3.8.7-buster 6 | 7 | Installed tools: 8 | - Ansible v2.9.2 9 | (Reason for staying on 2.9.2: the ec2 modules have been restructured. Any higher than that and our deployments fail and we would need to do refactoring). 10 | - git 11 | - openssh-client 12 | - boto3 13 | - boto 14 | 15 | ## Usage 16 | 17 | This image is intended to be used via CI. 18 | In your .gitlab-ci.yml, call this image as: 19 | `image: outlandish/ansible:X.Y.Z` 20 | 21 | ## How to create a new version of this docker image 22 | 23 | - Do any changes you want in the `Dockerfile` 24 | - Run `docker build -t outlandish/ansible:X.Y.Z .` 25 | Where X, Y, Z are your version. Until now we have been using as version the version of ansible we have installed. If more changes happen while the ansible version remains the same, add a minor version (example: 2.10.5.2 ) 26 | 27 | ## How to deploy it to docker hub 28 | 29 | You will need: 30 | - To have an account to the docker hub registry ( https://hub.docker.com/ ) 31 | - to be logged in (from your commandline): https://docs.docker.com/engine/reference/commandline/login/ 32 | - to have been given access to the outlandish namespace 33 | 34 | - After you have build your new docker image, you can push it with the following command `docker push outlandish/ansible:X.Y.Z` 35 | 36 | 37 | 38 | --------------------------------------------------------------------------------