forked from nrkno/sofie-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
27 lines (26 loc) · 965 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
# syntax=docker/dockerfile:experimental
# BUILD IMAGE
FROM node:12.22
RUN curl "https://install.meteor.com/?release=2.1.1" | sh
# Temporary change the NODE_ENV env variable, so that all libraries are installed:
ENV NODE_ENV_TMP $NODE_ENV
ENV NODE_ENV anythingButProduction
COPY packages /opt/core/packages
WORKDIR /opt/core/packages
RUN yarn install && yarn build
COPY meteor /opt/core/meteor
WORKDIR /opt/core/meteor
# 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:12.22-slim
COPY --from=0 /opt/bundle /opt/core
COPY meteor/docker-entrypoint.sh /opt
WORKDIR /opt/core/
CMD ["/opt/docker-entrypoint.sh"]