forked from UweGerdes/frontend-development
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
62 lines (46 loc) · 1.28 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
62
#
# Dockerfile for frontend-development
#
# docker build -t uwegerdes/frontend-development .
FROM uwegerdes/nodejs
MAINTAINER Uwe Gerdes <[email protected]>
ARG GULP_LIVERELOAD='5381'
ARG RESPONSIVE_CHECK_HTTP='5382'
ARG COMPARE_LAYOUTS_HTTP='5383'
ENV GULP_LIVERELOAD ${GULP_LIVERELOAD}
ENV RESPONSIVE_CHECK_HTTP ${RESPONSIVE_CHECK_HTTP}
ENV COMPARE_LAYOUTS_HTTP ${COMPARE_LAYOUTS_HTTP}
USER root
COPY package.json ${NODE_HOME}/
WORKDIR ${NODE_HOME}
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y \
firefox \
graphviz \
imagemagick \
php-cli \
xvfb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
npm install -g \
bower \
casperjs \
gulp \
marked \
node-gyp \
phplint && \
npm install -g git+https://github.com/laurentj/slimerjs.git && \
export NODE_TLS_REJECT_UNAUTHORIZED=0 && \
npm install && \
chown -R ${USER_NAME}:${USER_NAME} ${NODE_HOME}
COPY entrypoint.sh /usr/local/bin/
RUN chmod 755 /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
COPY . ${APP_HOME}
RUN chown -R ${USER_NAME}:${USER_NAME} ${APP_HOME}
WORKDIR ${APP_HOME}
USER ${USER_NAME}
VOLUME [ "${APP_HOME}" ]
EXPOSE ${GULP_LIVERELOAD} ${RESPONSIVE_CHECK_HTTP} ${COMPARE_LAYOUTS_HTTP}
CMD [ "npm", "start" ]