Open dchsueh opened 6 years ago
Completely valid. This will be ameliorated. Thanks!
For building the conductor image I used this Dockerfile:
FROM alpine:3.7
MAINTAINER zentavr <zentavr@hello.world>
ENV ANSIBLE_CONTAINER=1
ENV ANSIBLE_CONTAINER_VERSION=0.9.2
# How to build the conductor-image: http://docs.ansible.com/ansible-container/conductor.html#baking-your-own-conductor-base
# openssh is necessary until this is fixed: https://github.com/ansible/ansible/issues/24705
RUN apk add --no-cache -U \
python-dev \
py2-pip \
make \
git \
curl \
rsync \
libffi \
libffi-dev \
openssl \
openssl-dev \
gcc \
musl-dev \
tar \
openssh \
docker \
docker-py && rm -f /var/cache/apk/*
RUN mkdir -p /etc/ansible/roles /_ansible/src
# The COPY here will break cache if the version of Ansible Container changed
COPY / /_ansible/container
RUN cd /_ansible && \
pip install --no-cache-dir -r container/conductor-build/conductor-requirements.txt && \
pip install --no-cache-dir ansible-container[docker,k8s]==${ANSIBLE_CONTAINER_VERSION} && \
ansible-galaxy install -p /etc/ansible/roles -r container/conductor-build/conductor-requirements.yml
conductor-requirements.yml:
- src: ansible.kubernetes-modules
name: kubernetes-modules
conductor-requirements.txt:
https://github.com/ansible/ansible/archive/devel.tar.gz
https://github.com/openshift/openshift-restclient-python/archive/master.tar.gz#egg=openshift
PyYAML>=3.12
docker-compose>=1.14
requests>=2
ruamel.yaml>=0.14.2
six>=1.10
structlog[dev]>=16.1
python-string-utils>=0.6.0
docker build .
...
...
---> 1f8513cdf7a6
Successfully built 1f8513cdf7a6
docker tag 1f8513cdf7a6 container-conductor-alpine-3.7:0.9.2
You can find something interesting in container/docker/templates/conductor-src-dockerfile.j2
of the project.
ISSUE TYPE
container.yml
not applicable
OS / ENVIRONMENT
SUMMARY
Documentation on making conductor base images is very brief and lacks detail. Existing conductor base images have filesystem items (e.g. /_ansible, /usr/bin/conductor or /usr/local/bin/conductor) that aren't mentioned in the writeup at https://docs.ansible.com/ansible-container/conductor.html#baking-your-own-conductor-base .
(I also tried to make my own Dockerfile patterned after conductor-src-dockerfile.j2 but am unable to determine where many files are supposed to come from.)
(For the record, I'm trying to make a centos:6 conductor base; I'm well aware of the python 2.6 / 2.7 situation but that is the least of the problems I'm experiencing.)