-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
37 lines (27 loc) · 1.08 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
FROM ubuntu:latest
MAINTAINER George Jiglau <george@mux.ro>
# Install add-apt-repository
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -qy && \
apt-get install --no-install-recommends -qy software-properties-common
# Install Nginx
RUN add-apt-repository -y ppa:nginx/stable && \
apt-get update -q && \
apt-get install --no-install-recommends -qy nginx && \
chown -R www-data:www-data /var/lib/nginx && \
rm -f /etc/nginx/sites-available/default
# Install confd
ADD https://github.com/kelseyhightower/confd/releases/download/v0.9.0/confd-0.9.0-linux-amd64 /usr/local/bin/confd
RUN chmod u+x /usr/local/bin/confd && \
mkdir -p /etc/confd/conf.d && \
mkdir -p /etc/confd/templates
# Add confd configuration files
ADD ./src/conf.d/kubernetes-nginx.toml /etc/confd/conf.d/kubernetes-nginx.toml
ADD ./src/templates/kubernetes.conf.tmpl /etc/confd/templates/kubernetes.conf.tmpl
# Add confd watcher
ADD ./src/confd-watch /opt/confd-watch
RUN chmod +x /opt/confd-watch
# Expose http and https ports
EXPOSE 80 443
# Run the confd watcher by default
CMD /opt/confd-watch