forked from medialab/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (20 loc) · 833 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
FROM node:10.12.0-alpine
ENV NODE_ENV production
RUN apk add --no-cache su-exec util-linux git
ARG STATIC_URL="http://localhost:8000"
ENV GATSBY_WEBPACK_PUBLICPATH=${STATIC_URL}
ADD . /website
WORKDIR /website
RUN apk add --no-cache --virtual .build-deps make gcc g++ libc-dev libpng-dev automake autoconf libtool python \
&& npm ci --quiet --no-audit --ignore-scripts \
&& cd site \
&& SHARP_IGNORE_GLOBAL_LIBVIPS=1 && npm ci --quite --no-audit \
&& apk del .build-deps \
&& rm -fr /root/.npm /root/.node-gyp
VOLUME /website/data
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN chown -R node:node /website
RUN su-exec node:node git config --global user.email "[email protected]"
RUN su-exec node:node git config --global user.name "medialabot"
ENTRYPOINT ["/entrypoint.sh"]