Migrate to debian build
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Closes #1.
This commit is contained in:
parent
75a602685b
commit
ebc675f8ff
166
Dockerfile
166
Dockerfile
@ -1,148 +1,34 @@
|
|||||||
# This is a multi-stage build which requires Docker 17.05 or higher
|
FROM debian:buster
|
||||||
FROM docker.io/alpine:edge as molecule-builder
|
|
||||||
|
|
||||||
WORKDIR /usr/src/molecule
|
LABEL maintainer="decentral1se"
|
||||||
|
|
||||||
# WARNING: Reasons not to add edge/testing:
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
# * Breaks security scanning due to https://github.com/quay/clair/issues/901
|
|
||||||
# * Unreliable builds, as alpinelinux CDN is unreliable for edge, returning 404
|
RUN apt-get update \
|
||||||
# quite often.
|
&& apt-get install -y --no-install-recommends \
|
||||||
# edge/testing needed for: py3-arrow
|
build-essential \
|
||||||
RUN apk add -v --progress --update --no-cache \
|
|
||||||
bash \
|
|
||||||
docker-py \
|
|
||||||
gcc \
|
|
||||||
git \
|
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libvirt \
|
libssl-dev \
|
||||||
libvirt-dev \
|
python3-dev \
|
||||||
make \
|
python3-pip \
|
||||||
musl-dev \
|
python3-setuptools \
|
||||||
openssl-dev \
|
python3-wheel \
|
||||||
py3-bcrypt \
|
sudo \
|
||||||
py3-botocore \
|
wget \
|
||||||
py3-certifi \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
py3-cffi \
|
&& rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
|
||||||
py3-chardet \
|
&& apt-get clean
|
||||||
py3-click \
|
|
||||||
py3-colorama \
|
|
||||||
py3-cryptography \
|
|
||||||
py3-distlib \
|
|
||||||
py3-docutils \
|
|
||||||
py3-flake8 \
|
|
||||||
py3-future \
|
|
||||||
py3-idna \
|
|
||||||
py3-jinja2 \
|
|
||||||
py3-libvirt \
|
|
||||||
py3-markupsafe \
|
|
||||||
py3-mccabe \
|
|
||||||
py3-netifaces \
|
|
||||||
py3-paramiko \
|
|
||||||
py3-pbr \
|
|
||||||
py3-pip \
|
|
||||||
py3-pluggy \
|
|
||||||
py3-psutil \
|
|
||||||
py3-ptyprocess \
|
|
||||||
py3-py \
|
|
||||||
py3-pycodestyle \
|
|
||||||
py3-pynacl \
|
|
||||||
py3-pytest \
|
|
||||||
py3-requests \
|
|
||||||
py3-ruamel \
|
|
||||||
py3-setuptools \
|
|
||||||
py3-simplejson \
|
|
||||||
py3-urllib3 \
|
|
||||||
py3-virtualenv \
|
|
||||||
py3-websocket-client \
|
|
||||||
py3-yaml \
|
|
||||||
python3 \
|
|
||||||
python3-dev
|
|
||||||
|
|
||||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917006
|
|
||||||
RUN \
|
|
||||||
python3 -m pip install -U wheel pip setuptools
|
|
||||||
|
|
||||||
ADD . .
|
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
python3 -m pip wheel \
|
python3 -m pip install -U \
|
||||||
-w dist \
|
pip \
|
||||||
molecule testinfra molecule-hetznercloud molecule-docker ansible ansible-lint
|
setuptools
|
||||||
|
|
||||||
RUN ls -1 dist/
|
|
||||||
|
|
||||||
# ✄---------------------------------------------------------------------
|
|
||||||
# This is an actual target container:
|
|
||||||
|
|
||||||
FROM alpine:edge
|
|
||||||
LABEL maintainer="decentral1se <decentral1se@disroot.org>"
|
|
||||||
|
|
||||||
ENV PACKAGES="\
|
|
||||||
bash \
|
|
||||||
docker \
|
|
||||||
git \
|
|
||||||
openssh-client \
|
|
||||||
docker-py \
|
|
||||||
libvirt \
|
|
||||||
rsync \
|
|
||||||
py3-bcrypt \
|
|
||||||
py3-botocore \
|
|
||||||
py3-certifi \
|
|
||||||
py3-cffi \
|
|
||||||
py3-chardet \
|
|
||||||
py3-click \
|
|
||||||
py3-colorama \
|
|
||||||
py3-cryptography \
|
|
||||||
py3-docutils \
|
|
||||||
py3-flake8 \
|
|
||||||
py3-idna \
|
|
||||||
py3-jinja2 \
|
|
||||||
py3-mccabe \
|
|
||||||
py3-netifaces \
|
|
||||||
py3-paramiko \
|
|
||||||
py3-pbr \
|
|
||||||
py3-pip \
|
|
||||||
py3-pluggy \
|
|
||||||
py3-psutil \
|
|
||||||
py3-ptyprocess \
|
|
||||||
py3-py \
|
|
||||||
py3-pycodestyle \
|
|
||||||
py3-pynacl \
|
|
||||||
py3-pytest \
|
|
||||||
py3-requests \
|
|
||||||
py3-ruamel \
|
|
||||||
py3-setuptools \
|
|
||||||
py3-urllib3 \
|
|
||||||
py3-virtualenv \
|
|
||||||
py3-websocket-client \
|
|
||||||
python3 \
|
|
||||||
"
|
|
||||||
|
|
||||||
ENV BUILD_DEPS="\
|
|
||||||
gcc \
|
|
||||||
libc-dev \
|
|
||||||
libvirt-dev \
|
|
||||||
make \
|
|
||||||
"
|
|
||||||
|
|
||||||
ENV PIP_INSTALL_ARGS="\
|
|
||||||
--only-binary :all: \
|
|
||||||
--no-index \
|
|
||||||
-f /usr/src/molecule/dist \
|
|
||||||
"
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
apk add --update --no-cache \
|
|
||||||
${BUILD_DEPS} ${PACKAGES} \
|
|
||||||
&& apk del --no-cache ${BUILD_DEPS} \
|
|
||||||
&& rm -rf /root/.cache
|
|
||||||
|
|
||||||
COPY --from=molecule-builder \
|
|
||||||
/usr/src/molecule/dist \
|
|
||||||
/usr/src/molecule/dist
|
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
python3 -m pip install \
|
python3 -m pip install \
|
||||||
molecule testinfra molecule-hetznercloud molecule-docker ansible ansible-lint
|
ansible \
|
||||||
|
ansible-lint \
|
||||||
ENV SHELL /bin/bash
|
molecule \
|
||||||
|
molecule-docker \
|
||||||
|
molecule-hetznercloud \
|
||||||
|
testinfra
|
||||||
|
Loading…
Reference in New Issue
Block a user