Skip to content
Snippets Groups Projects
Select Git revision
  • 84f1e643d16aa5817886cb8cda7043f7220bd7c2
  • main default protected
2 results

Dockerfile

Blame
  • Dockerfile 1.03 KiB
    FROM registry.cyberbrain.pw/docker/alpine:latest AS builder
    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 \
            && \
        python3 -m venv /opt/ansible && \
        pip3 install --ignore-installed --no-cache-dir --upgrade \
            pip \
            setuptools \
            wheel \
            && \
        pip3 install --ignore-installed --no-cache-dir \
            ansible \
            ansible-lint \
            mitogen \
            jmespath \
            pywinrm \
            patch \
            && \
        #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
    COPY --from=builder /opt/ansible /opt/ansible
    CMD [ "ansible", "--version" ]