From d5ba2032252360ed83a81652ed349962a3f2380e Mon Sep 17 00:00:00 2001 From: Alejandro Izquierdo Date: Fri, 5 Aug 2022 13:33:12 +0200 Subject: [PATCH] add dockerfile and update docs --- .dockerignore | 8 ++++++++ Dockerfile | 16 ++++++++++++++++ README.rst | 24 ++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..a221c835 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +.git +venv +.venv/ +**/*.pyc +**/__pycache__ +.tox +.vscode/ +.idea/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ca3e70a3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM registry.access.redhat.com/ubi9/python-39 + +ARG USER_ID=${USER_ID:-1001} +WORKDIR $HOME + +USER 0 +RUN pip install -U pip \ + && pip install ansible \ + ansible-runner \ + jmespath \ + && ansible-galaxy collection install benthomasson.eda +COPY . $WORKDIR +RUN chown -R $USER_ID ./ + +USER $USER_ID +RUN pip install . diff --git a/README.rst b/README.rst index f797e02b..91af22e8 100644 --- a/README.rst +++ b/README.rst @@ -135,6 +135,30 @@ inside the collection benthomasson.eda. +How to install +-------------- + +Via PyPi: +######### + +.. code-block:: shell-session + + pip install ansible-events + +Via Docker: +########### + +.. code-block:: shell-session + + docker build -t ansible-events . + + +Usage +-------------- + +.. code-block:: shell-session + + ansible-events --help Credits