From 77b38ca03e5a963a5eeaf194916ba9a852eddb0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=A1=D0=B0?=
 =?UTF-8?q?=D1=84=D1=80=D0=BE=D0=BD=D0=BE=D0=B2?= <zimniy@cyberbrain.pw>
Date: Sat, 26 Jun 2021 19:49:24 +0000
Subject: [PATCH] Fix

---
 Dockerfile | 37 +++++--------------------------------
 1 file changed, 5 insertions(+), 32 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index e4d3c2c..bfb8510 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,45 +2,18 @@ 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 \
-        musl-dev \
-        python3-dev \
-        libffi-dev \
-        openssl-dev \
-        cargo \
-        && \
+    apk --no-cache add --virtual build-dependencies musl-dev python3-dev libffi-dev openssl-dev cargo && \
     python3 -m venv /opt/ansible && \
-    pip3 install --ignore-installed --no-cache-dir --upgrade \
-        pip \
-        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-lint \
-        mitogen \
-        jmespath \
-        pywinrm \
-        patch \
-        && \
+    pip3 install --ignore-installed --no-cache-dir --upgrade pip setuptools wheel && \
+    export ANSIBLE_PACKAGES="pyyaml ansible-lint mitogen jmespath pywinrm patch" && \
+    ( 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 && \
     rm -rf /var/cache/apk/*
 
 FROM registry.cyberbrain.pw/docker/alpine:latest AS runtime
 ENV PATH="/opt/ansible/bin:$PATH"
 WORKDIR /srv/ansible
-RUN apk --no-cache add \
-        python3 \
-        openssl \
-        ca-certificates \
-        sshpass \
-        openssh-client \
-        rsync \
-        git \
-        && \
+RUN apk --no-cache add python3 openssl ca-certificates sshpass openssh-client rsync git && \
     rm -rf /var/cache/apk/*
 COPY --from=builder /opt/ansible /opt/ansible
 CMD [ "ansible", "--version" ]
-- 
GitLab