Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Stingus committed Jan 30, 2018
0 parents commit 68726aa
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM alpine

VOLUME ["/project"]

WORKDIR "/project"

RUN apk add --no-cache python3 \
&& python3 -m ensurepip \
&& rm -r /usr/lib/python*/ensurepip \
&& pip3 install --upgrade pip setuptools \
&& ln -s pip3 /usr/bin/pip \
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& apk add --no-cache --virtual .build-deps \
g++ \
make \
python3-dev \
libffi-dev \
openssl-dev \
&& pip install ansible==2.4.2 \
&& apk del .build-deps \
&& rm -r /root/.cache
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Ansible Docker image

This Docker image is based on Alpine and Python3 and provides the Ansible executable.
Check the repo tags for the available Ansible versions.

## Usage

```bash
$ docker run --rm stingus/ansible -v <your_ansible_project_path>:/project
```
This will start a Docker container with your Ansible project mounted in `/project`.

### Running a playbook
It's recommended to keep your inventory in the project thus not to rely on /etc/ansible/hosts.

```bash
$ ansible-playbook -i hosts your_playbook.yml
```

## LICENSE

MIT

0 comments on commit 68726aa

Please sign in to comment.