-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (28 loc) · 975 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
35
36
37
#
# Reverse proxy for kubernetes
#
FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
RUN rm /var/lib/apt/lists/* -vfr
# Prepare requirements
RUN apt-get update -qy && \
apt-get install --no-install-recommends -qy software-properties-common
# setup confd
ADD ./src/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 ./src/confd/conf.d/myconfig.toml /etc/confd/conf.d/myconfig.toml
ADD ./src/confd/templates/nginx.tmpl /etc/confd/templates/nginx.tmpl
ADD ./src/confd/confd.toml /etc/confd/confd.toml
# 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
ADD ./src/boot.sh /opt/boot.sh
RUN chmod +x /opt/boot.sh
EXPOSE 80 443
# Run the boot script
CMD /opt/boot.sh