-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
45 lines (34 loc) · 1.27 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM ubuntu:16.04
MAINTAINER "vccw-team"
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y && \
apt-get install apt-utils -y && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:ansible/ansible && \
apt-get update && \
apt-get install -y --no-install-recommends ansible curl vim sudo && \
apt-get clean && \
groupadd -g 1000 ubuntu && \
useradd -g ubuntu -G sudo -m -s /bin/bash ubuntu && \
echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN mkdir /opt/provision && chown -R ubuntu:ubuntu /opt/provision
COPY provision /opt/provision
RUN WORK_DIR=$(pwd)
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
RUN ansible-playbook /opt/provision/playbook.yml
RUN rm -rf /usr/share/doc && \
rm -rf /var/lib/apt/lists/* && \
rm -Rf /usr/share/man && \
find /var/cache -type f -exec rm -rf {} \; && \
apt-get -y autoremove && \
apt-get -y clean && \
rm -f ${WORK_DIR}/playbook.yml
COPY initctl_faker .
RUN chmod +x initctl_faker && rm -fr /sbin/initctl && ln -s /initctl_faker /sbin/initctl
CMD ["/usr/bin/monit", "-I", "-c", "/etc/monit/monitrc"]
EXPOSE 20009
EXPOSE 20008