From a8bbbca2194ae5429ec1f38475f8d51480d223c8 Mon Sep 17 00:00:00 2001 From: Dmitriy Safronov <zimniy@cyberbrain.pw> Date: Thu, 1 Jul 2021 20:00:23 +0300 Subject: [PATCH] Dockerfile --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0c4e28e..fe3fe69 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,17 @@ FROM registry.cyberbrain.pw/docker/alpine:latest AS builder -ARG ANSIBLE_VERSION -ARG ANSIBLE_BUILD_DEPENDENCIES="musl-dev python3-dev libffi-dev openssl-dev yaml-dev cargo" -ARG ANSIBLE_PACKAGES="pyyaml ansible-lint mitogen jmespath pywinrm patch hvac" +ARG ANSIBLE_BUILD_DEPENDENCIES +ARG ANSIBLE_PACKAGES ENV PATH="/opt/ansible/bin:$PATH" RUN apk --no-cache add python3 && \ apk --no-cache add --virtual build-dependencies ${ANSIBLE_BUILD_DEPENDENCIES} && \ python3 -m venv /opt/ansible && \ pip3 install --ignore-installed --no-cache-dir --upgrade pip setuptools wheel && \ - ( test -z $ANSIBLE_VERSION && pip3 install --ignore-installed --no-cache-dir ansible ${ANSIBLE_PACKAGES} || pip3 install --ignore-installed --no-cache-dir ansible\<=$ANSIBLE_VERSION ${ANSIBLE_PACKAGES} ) && \ + pip3 install --ignore-installed --no-cache-dir ansible ${ANSIBLE_PACKAGES} && \ #apk del build-dependencies && \ rm -rf /var/cache/apk/* FROM registry.cyberbrain.pw/docker/alpine:latest AS runtime -ARG ANSIBLE_RUNTIME_DEPENDENCIES="yaml openssl ca-certificates sshpass openssh-client rsync git" +ARG ANSIBLE_RUNTIME_DEPENDENCIES ENV PATH="/opt/ansible/bin:$PATH" WORKDIR /srv/ansible RUN apk --no-cache add python3 && \ -- GitLab