Skip to content
Snippets Groups Projects
Commit 7d594873 authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

Merge branch '3-customizable-ansible-version' into 'master'

Resolve "Customizable Ansible version"

Closes #3

See merge request docker/ansible!21
parents 9306b3ac 763905f1
Branches
No related tags found
1 merge request!21Resolve "Customizable Ansible version"
Pipeline #2612 passed
FROM registry.cyberbrain.pw/docker/alpine:latest AS builder
ARG ANSIBLE_VERSION
ENV PATH="/opt/ansible/bin:$PATH"
RUN apk --no-cache add python3 && \
apk --no-cache add --virtual build-dependencies \
......@@ -14,8 +15,11 @@ RUN apk --no-cache add python3 && \
setuptools \
wheel \
&& \
( test -z $ANSIBLE_VERSION && \
pip install --ignore-installed --no-cache-dir ansible || \
pip install --ignore-installed --no-cache-dir ansible\<=$ANSIBLE_VERSION \
) && \
pip3 install --ignore-installed --no-cache-dir \
ansible \
ansible-lint \
mitogen \
jmespath \
......@@ -35,6 +39,8 @@ RUN apk --no-cache add \
sshpass \
openssh-client \
rsync \
git
git \
&& \
rm -rf /var/cache/apk/*
COPY --from=builder /opt/ansible /opt/ansible
CMD [ "ansible", "--version" ]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment