-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile
40 lines (28 loc) · 1.12 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
FROM nginx:stable
MAINTAINER [email protected]
RUN apt-get update \
&& apt-get install --no-install-recommends -y curl
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs --no-install-recommends
RUN apt-get install --no-install-recommends -y unzip sed
ENV GITLAB_CE_PAGES_HOME="/home/pages" \
GITLAB_CE_PAGES_USER="pages"
ENV GITLAB_CE_PAGES_PUBLIC_DIR="${GITLAB_CE_PAGES_HOME}/public" \
GITLAB_CE_PAGES_WEBHOOK_DIR="${GITLAB_CE_PAGES_HOME}/webhook" \
GITLAB_CE_PAGES_CNAME_DIR="${GITLAB_CE_PAGES_HOME}/cname"
WORKDIR ${GITLAB_CE_PAGES_WEBHOOK_DIR}
COPY src/package.json ${GITLAB_CE_PAGES_WEBHOOK_DIR}/
RUN npm install
RUN npm install -g nodemon
ENV TINI_VERSION v0.10.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
COPY entrypoint.sh /
COPY config/nginx.conf /etc/nginx/nginx.conf
RUN rm -f /etc/nginx/conf.d/*
COPY src/ ${GITLAB_CE_PAGES_WEBHOOK_DIR}/
EXPOSE 80/tcp
VOLUME ["${GITLAB_CE_PAGES_PUBLIC_DIR}"]
VOLUME ["${GITLAB_CE_PAGES_CNAME_DIR}"]
CMD ["/entrypoint.sh", "/usr/bin/npm", "start"]