forked from docktor/docktor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·61 lines (49 loc) · 1.77 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#FROM debian:jessie
FROM ubuntu:xenial
# Proxy variables, only for build
ARG HTTP_PROXY="http://renn.proxy.corp.sopra:8080/"
ARG http_proxy=${HTTP_PROXY}
ARG HTTPS_PROXY=${HTTP_PROXY}
ARG https_proxy=${HTTP_PROXY}
ARG NO_PROXY="127.0.0.1,localhost,*.sopra,.sopra"
ARG no_proxy=${NO_PROXY}
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true
COPY supervisord.conf.d/* /etc/supervisor/conf.d/
COPY startup.sh /opt/startup.sh
COPY build.sh /opt/build.sh
COPY generate-certs.sh /opt/docktor/generate-certs.sh
ENV NODE_ENV production
# Get Node.JS & NPM & GIT & config
RUN apt-get -y update && \
apt-get -y install supervisor nodejs npm git vim && \
ln -s /usr/bin/nodejs /usr/bin/node && \
mkdir -p /home/docktor && \
useradd -d /home/docktor -s /bin/sh docktor && \
cd /home/docktor && \
chown -R docktor:docktor . && \
chmod -R go=u,go-w . && \
echo 'docktor:docktorpass' | chpasswd && \
chown -R docktor:docktor /opt/ && \
chmod +x /opt/startup.sh /opt/build.sh /opt/docktor/generate-certs.sh && \
npm install -g bower && \
npm install -g grunt-cli && \
npm install -g grunt && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY server.js /opt/docktor/docktor/server.js
COPY bower.json /opt/docktor/docktor/bower.json
COPY gruntfile.js /opt/docktor/docktor/gruntfile.js
COPY package.json /opt/docktor/docktor/package.json
COPY .bowerrc /opt/docktor/docktor/.bowerrc
COPY .csslintrc /opt/docktor/docktor/.csslintrc
COPY .jshintrc /opt/docktor/docktor/.jshintrc
COPY .slugignore /opt/docktor/docktor/.slugignore
COPY app /opt/docktor/docktor/app/
COPY config /opt/docktor/docktor/config/
COPY node_modules /opt/docktor/docktor/node_modules/
COPY public /opt/docktor/docktor/public/
USER docktor
USER root
RUN /opt/build.sh
CMD ["/opt/startup.sh"]