Skip to content
Snippets Groups Projects

Fix

Merged Dmitriy Safronov requested to merge fix into master
1 file
+ 7
5
Compare changes
  • Side-by-side
  • Inline
+ 7
5
FROM registry.cyberbrain.pw/docker/alpine:latest AS builder
FROM registry.cyberbrain.pw/docker/alpine:latest AS builder
ARG ANSIBLE_VERSION
ARG ANSIBLE_BUILD_DEPENDENCIES
 
ARG ANSIBLE_PACKAGES
ENV PATH="/opt/ansible/bin:$PATH"
ENV PATH="/opt/ansible/bin:$PATH"
RUN apk --no-cache add python3 && \
RUN apk --no-cache add python3 && \
apk --no-cache add --virtual build-dependencies musl-dev python3-dev libffi-dev openssl-dev yaml-dev cargo && \
apk --no-cache add --virtual build-dependencies ${ANSIBLE_BUILD_DEPENDENCIES} && \
python3 -m venv /opt/ansible && \
python3 -m venv /opt/ansible && \
pip3 install --ignore-installed --no-cache-dir --upgrade pip setuptools wheel && \
pip3 install --ignore-installed --no-cache-dir --upgrade pip setuptools wheel && \
export ANSIBLE_PACKAGES="pyyaml ansible-lint mitogen jmespath pywinrm patch hvac" && \
pip3 install --ignore-installed --no-cache-dir ansible ${ANSIBLE_PACKAGES} && \
( test -z $ANSIBLE_VERSION && pip install --ignore-installed --no-cache-dir ansible ${ANSIBLE_PACKAGES} || pip install --ignore-installed --no-cache-dir ansible\<=$ANSIBLE_VERSION ${ANSIBLE_PACKAGES} ) && \
#apk del build-dependencies && \
#apk del build-dependencies && \
rm -rf /var/cache/apk/*
rm -rf /var/cache/apk/*
FROM registry.cyberbrain.pw/docker/alpine:latest AS runtime
FROM registry.cyberbrain.pw/docker/alpine:latest AS runtime
 
ARG ANSIBLE_RUNTIME_DEPENDENCIES
ENV PATH="/opt/ansible/bin:$PATH"
ENV PATH="/opt/ansible/bin:$PATH"
WORKDIR /srv/ansible
WORKDIR /srv/ansible
RUN apk --no-cache add python3 yaml openssl ca-certificates sshpass openssh-client rsync git && \
RUN apk --no-cache add python3 && \
 
apk --no-cache add ${ANSIBLE_RUNTIME_DEPENDENCIES} && \
rm -rf /var/cache/apk/*
rm -rf /var/cache/apk/*
COPY --from=builder /opt/ansible /opt/ansible
COPY --from=builder /opt/ansible /opt/ansible
CMD [ "ansible", "--version" ]
CMD [ "ansible", "--version" ]
Loading