-
Notifications
You must be signed in to change notification settings - Fork 33
/
Dockerfile
31 lines (26 loc) · 891 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3.6
LABEL maintainer="[email protected]"
# prepare directory
WORKDIR /code
# install dependencies
RUN apt-get update && \
apt-get install --no-install-recommends -y libsasl2-dev python-dev libldap2-dev libssl-dev && \
rm -rf /var/lib/apt/lists/* && \
mkdir /var/log/kqueen-api && \
mkdir /opt/kqueen
# install kubespray
RUN git clone -b v2.5.0 https://github.com/kubernetes-incubator/kubespray.git && \
pip install -r kubespray/requirements.txt
# copy app
COPY . kqueen
RUN pip install ./kqueen
# Avoid Ssh issues with docker overlayfs and sockets
ENV ANSIBLE_SSH_CONTROL_PATH /dev/shm/cp%%h-%%p-%%r
ENV ANSIBLE_SSH_RETRIES 5
ENV ANSIBLE_TIMEOUT 25
ENV KQUEEN_KS_KUBESPRAY_PATH /code/kubespray
ENV KQUEEN_KS_ANSIBLE_CMD /usr/local/bin/ansible
ENV KQUEEN_KS_ANSIBLE_PLAYBOOK_CMD /usr/local/bin/ansible-playbook
# run app
WORKDIR /code/kqueen
CMD ./entrypoint.sh