-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
35 lines (23 loc) · 920 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
FROM debian:jessie
RUN apt-get update
RUN apt-get install -y nginx fcgiwrap
RUN apt-get install -y wget telnet vim
RUN apt-get install -y mysql-client
# install jq from binary
RUN wget -O /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
RUN chmod +x /usr/bin/jq
# nginx config
COPY conf/nginx-bash-end.conf /etc/nginx/sites-enabled/
# rights for the fcgi socket
RUN chmod 777 /run
RUN /etc/init.d/nginx reload
COPY . /var/www/
# change the db_host to connect to the host (instead of localhost on the docker container)
RUN sed -i 's/^db_host.*$/db_host: host.docker.internal/' /var/www/conf/config.yaml
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
EXPOSE 6969
STOPSIGNAL SIGTERM
#CMD ["nginx", "-g", "daemon off;"]
CMD service fcgiwrap start; nginx -g "daemon off;"