forked from nrkno/sofie-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
24 lines (23 loc) · 871 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
# syntax=docker/dockerfile:experimental
# BUILD IMAGE
FROM node:8.11.4
RUN curl "https://install.meteor.com/?release=1.6.1.4" | sh
COPY meteor /opt/core/meteor
WORKDIR /opt/core/meteor
# Temporary change the NODE_ENV env variable, so that all libraries are installed:
ENV NODE_ENV_TMP $NODE_ENV
ENV NODE_ENV anythingButProduction
# Force meteor to setup the runtime
RUN meteor --version --allow-superuser
RUN meteor npm install
# Restore the NODE_ENV variable:
ENV NODE_ENV $NODE_ENV_TMP
RUN --mount=type=cache,target=/opt/core/meteor/.meteor/local NODE_OPTIONS="--max-old-space-size=4096" METEOR_DEBUG_BUILD=1 meteor build --allow-superuser --directory /opt/
WORKDIR /opt/bundle/programs/server/
RUN npm install
# DEPLOY IMAGE
FROM node:8.11.4-slim
COPY --from=0 /opt/bundle /opt/core
COPY docker-entrypoint.sh /opt
WORKDIR /opt/core/
CMD ["/opt/docker-entrypoint.sh"]