-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (33 loc) · 1.48 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
# Based on:
# - https://github.com/jshimko/meteor-launchpad/blob/master/Dockerfile
# - https://github.com/meteor/galaxy-images/blob/master/ubuntu/Dockerfile
FROM ubuntu
ARG FONTAWESOMETOKEN
ENV FONTAWESOMETOKEN ${FONTAWESOMETOKEN}
# Default Meteor version if not defined at build time; see ../build.sh
ARG METEOR_VERSION=1.10.1
# Install dependencies, based on https://github.com/jshimko/meteor-launchpad/blob/master/scripts/install-deps.sh (only the parts we plan to use)
RUN apt-get update && \
apt-get install --assume-yes apt-transport-https ca-certificates && \
apt-get install --assume-yes --no-install-recommends build-essential bsdtar bzip2 curl git python
# Install Meteor
RUN curl https://install.meteor.com/?release=$METEOR_VERSION --output /tmp/install-meteor.sh && \
# Replace tar with bsdtar in the install script; https://github.com/jshimko/meteor-launchpad/issues/39
sed --in-place "s/tar -xzf.*/bsdtar -xf \"\$TARBALL_FILE\" -C \"\$INSTALL_TMPDIR\"/g" /tmp/install-meteor.sh && \
# Install Meteor
printf "\n[-] Installing Meteor $METEOR_VERSION...\n\n" && \
sh /tmp/install-meteor.sh
# Fix permissions warning; https://github.com/meteor/meteor/issues/7959
ENV METEOR_ALLOW_SUPERUSER true
WORKDIR /app
COPY ./package*.json /app/
COPY ./.npmrc /app/
RUN meteor npm install
COPY . /app/
RUN meteor build --directory build --server-only
FROM node:12.16.1-alpine
COPY --from=0 /app/build/bundle /app/
RUN ls
RUN cd /app/programs/server && npm install
WORKDIR /app
CMD ["node", "main.js"]