From 311de40b0a1f8fb81541a96549aabad74f53742d Mon Sep 17 00:00:00 2001 From: "H.Hedhly" <9963093+thehedhly@users.noreply.github.com> Date: Thu, 7 Nov 2024 08:44:07 +0100 Subject: [PATCH] Split readme example cmds (#16) * Simplify project usage --------- Co-authored-by: thehedhly --- README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 47b5bbc..c03c611 100644 --- a/README.md +++ b/README.md @@ -17,26 +17,30 @@ In accordance with both ansible community projects, __ansible community package_ | ansible-core | | [thehedhly/ansible-core](https://hub.docker.com/repository/docker/thehedhly/ansible-core) | ## Usage -* Build the ansible or ansible-core docker image, run then attach to the container: +### Format +Build the ansible or ansible-core docker image, run then attach to the container: ```bash docker compose run --build --remove-orphans --rm ``` -* Build the ansible or ansible-core docker image, run command without attaching to the container: +Build the ansible or ansible-core docker image, run command without attaching to the container: ```bash docker compose run --build --remove-orphans --rm ``` -Examples: +### Examples +Build ansible image, run and attach to container ```bash -# Build ansible image, run and attach to container docker compose run --build --remove-orphans --rm ansible -# or -# Build ansible-core image, run and attach to container +``` +Build ansible-core image, run and attach to container +```bash docker compose run --build --remove-orphans --rm ansible-core -# or -# Build ansible image, run 'ansible --version' command without attaching to the container +``` +Build ansible image, run 'ansible --version' command without attaching to the container +```bash docker compose run --build --remove-orphans --rm ansible ansible --version -# or -# Build ansible-core image, run 'ansible --version' command without attaching to the container +``` +Build ansible-core image, run 'ansible --version' command without attaching to the container +```bash docker compose run --build --remove-orphans --rm ansible-core ansible --version ``` To use a specefic ansible or ansible-core version, please see [docker-compose.yml](docker-compose.yml) and [list of supported build arguments](#build-arguments).