-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
34 lines (23 loc) · 832 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
32
33
34
#Builds Ubuntu Jekyll image
FROM mrlesmithjr/ubuntu-ansible
MAINTAINER [email protected]
#Install packages
RUN apt-get update && \
apt-get install -y git
#Create Ansible Folder
RUN mkdir -p /opt/ansible-playbooks/roles
#Clone GitHub Repo
RUN git clone https://github.com/mrlesmithjr/ansible-jekyll.git /opt/ansible-playbooks/roles/ansible-jekyll && \
git clone https://github.com/mrlesmithjr/ansible-nginx.git /opt/ansible-playbooks/roles/ansible-nginx
#Copy Ansible playbooks
COPY playbook.yml /opt/ansible-playbooks/
#Run Ansible playbook
RUN ansible-playbook -i "localhost," -c local /opt/ansible-playbooks/playbook.yml
# Cleanup
RUN apt-get clean -y && \
apt-get autoremove -y
# Cleanup
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#Expose ports
EXPOSE 80 4000
CMD ["nginx", "-g", "daemon off;"]