add kubeasz dockerfiles

pull/475/head
gjmzj 2019-03-03 18:16:26 +08:00
parent 399de72fe4
commit 3eb9dfbd94
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,29 @@
# Dockerfile for building Ansible image for Alpine 3
# Origin from https://github.com/William-Yeh/docker-ansible
FROM alpine:3.8
RUN \
echo "===> Adding Python runtime..." && \
apk --update add python py-pip openssl ca-certificates && \
apk --update add --virtual build-dependencies \
python-dev libffi-dev openssl-dev build-base && \
pip install --upgrade pip cffi && \
\
\
echo "===> Installing Ansible..." && \
pip install ansible==2.6.12 && \
\
\
echo "===> Installing handy tools..." && \
pip install --upgrade pycrypto && \
apk --update add bash openssh-client rsync && \
\
\
echo "===> Removing package list..." && \
apk del build-dependencies && \
rm -rf /var/cache/apk/* && \
rm -rf /root/.cache
# default command: display Ansible version
CMD [ "ansible", "--version" ]

View File

@ -0,0 +1,10 @@
# NOTE: Prepare following Requirements and Build the image "kubeasz:$TAG"
# Requirement 1: git clone https://github.com/gjmzj/kubeasz.git
# Requirement 2: download binaries at https://pan.baidu.com/s/1c4RFaA, and put into dir 'kubeasz/bin'
# Build: docker build -t kubeasz:$TAG .
FROM jmgao1983/ansible:v2.6
COPY kubeasz/ /etc/ansible
CMD [ "sleep", "360000000" ]