forked from kromitgmbh/titra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (42 loc) · 1.27 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
FROM node:14.18
ENV METEOR_ALLOW_SUPERUSER true
RUN curl https://install.meteor.com/ | sh
RUN meteor --version
WORKDIR /app/
COPY package.json .
COPY package-lock.json .
RUN meteor npm ci
COPY public/ ./public/
COPY server/ ./server/
COPY client/ ./client/
COPY imports/ ./imports/
COPY .meteor/ ./.meteor/
RUN meteor build /build/ --server-only --architecture os.linux.x86_64
FROM node:14.18-alpine
RUN apk --no-cache add \
bash \
curl \
g++ \
make \
python3
COPY --from=0 /build/*.tar.gz /app/bundle.tar.gz
WORKDIR /app/
RUN tar xvzf bundle.tar.gz
RUN cd /app/bundle/programs/server; npm ci; npm prune --production;
RUN curl -sfL https://gobinaries.com/tj/node-prune -o /tmp/node-prune.sh
RUN chmod +x /tmp/node-prune.sh
RUN /tmp/node-prune.sh
RUN rm -r /app/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/typescript
RUN rm -r /app/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/@babel
RUN rm -r /app/bundle/programs/server/npm/node_modules/@neovici/nullxlsx/cc-test-reporter
FROM node:14.1-alpine
RUN apk --no-cache add \
bash \
ca-certificates
ENV PORT 3000
EXPOSE 3000
WORKDIR /app/
COPY --from=1 app/bundle bundle
COPY entrypoint.sh /docker/entrypoint.sh
ENTRYPOINT ["/docker/entrypoint.sh"]
CMD ["node", "bundle/main.js"]