This commit is contained in:
parent
360efd409c
commit
6d4775acad
39
docker/Dockerfile.hcloud.linux.amd64
Normal file
39
docker/Dockerfile.hcloud.linux.amd64
Normal file
@ -0,0 +1,39 @@
|
||||
FROM python:3.7-alpine
|
||||
|
||||
LABEL maintainer="Robert Kaussow <mail@geeklabor.de>" \
|
||||
org.label-schema.name="molecule" \
|
||||
org.label-schema.vcs-url="https://gitea.rknet.org/docker/molecule" \
|
||||
org.label-schema.vendor="Robert Kaussow" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
ENV PACKAGES="\
|
||||
gcc \
|
||||
make \
|
||||
bash \
|
||||
libffi-dev \
|
||||
musl-dev \
|
||||
openssl-dev \
|
||||
python-dev \
|
||||
git \
|
||||
openssh-client \
|
||||
"
|
||||
|
||||
ENV PIP_PACKAGES="\
|
||||
ansible~=2.8.0 \
|
||||
molecule[hetznercloud] \
|
||||
virtualenv \
|
||||
pycrypto \
|
||||
"
|
||||
|
||||
COPY ./hcloud-entrypoint.sh /docker-entrypoint.sh
|
||||
|
||||
RUN \
|
||||
apk update \
|
||||
&& apk add --update --no-cache ${PACKAGES} \
|
||||
&& rm -rf /var/cache/apk/* \
|
||||
&& pip install --upgrade pip \
|
||||
&& pip install --no-cache-dir ${PIP_PACKAGES} \
|
||||
&& rm -rf /root/.cache \
|
||||
|
||||
USER root
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
17
hcloud-entrypoint.sh
Executable file
17
hcloud-entrypoint.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o pipefail
|
||||
set -o errtrace
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
ANSIBLE_ROLES_PATH=${ANSIBLE_ROLES_PATH:-/drone/src}
|
||||
|
||||
if [ "${MOLECULE_CUSTOM_MODULES_REPO}" ]; then
|
||||
mkdir ./library/
|
||||
git clone "$MOLECULE_CUSTOM_MODULES_REPO" ./library/
|
||||
fi
|
||||
|
||||
if [ "${MOLECULE_CUSTOM_FILTERS_REPO}" ]; then
|
||||
mkdir -p ./plugins/filters/
|
||||
git clone "$MOLECULE_CUSTOM_FILTERS_REPO" ./plugins/filters/
|
||||
fi
|
Reference in New Issue
Block a user