2018-01-20 04:41:02 +08:00
|
|
|
FROM node:8
|
|
|
|
|
|
|
|
RUN set -x \
|
|
|
|
&& curl -sL https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh \
|
2018-07-26 02:14:55 +08:00
|
|
|
&& useradd -m -G users -s /bin/bash meteor
|
2018-06-15 21:21:03 +08:00
|
|
|
|
2018-07-26 02:14:55 +08:00
|
|
|
RUN apt-get update && apt-get -y install jq
|
|
|
|
|
|
|
|
COPY . /source
|
|
|
|
|
|
|
|
RUN cd /source \
|
|
|
|
&& mv docker-entrypoint.sh /usr/local/bin/ \
|
|
|
|
&& chown -R meteor:meteor . \
|
|
|
|
&& mkdir /app \
|
2018-01-20 04:41:02 +08:00
|
|
|
&& chown -R meteor:meteor /app
|
|
|
|
|
|
|
|
USER meteor
|
|
|
|
|
|
|
|
RUN cd /source \
|
|
|
|
&& meteor npm install \
|
2018-08-17 11:48:48 +08:00
|
|
|
&& meteor build --directory /app
|
2018-01-20 04:41:02 +08:00
|
|
|
|
|
|
|
ENV NODE_ENV production
|
|
|
|
|
|
|
|
RUN cd /app/bundle/programs/server \
|
|
|
|
&& npm install \
|
|
|
|
&& npm cache clear --force
|
|
|
|
|
|
|
|
WORKDIR /app/bundle
|
|
|
|
|
|
|
|
ENV MONGO_URL=mongodb://mongo:27017/html5client \
|
|
|
|
PORT=3000 \
|
2018-07-26 02:14:55 +08:00
|
|
|
ROOT_URL=http://localhost:3000 \
|
|
|
|
METEOR_SETTINGS_MODIFIER=.
|
2018-01-20 04:41:02 +08:00
|
|
|
|
|
|
|
EXPOSE 3000
|
|
|
|
|
2018-07-26 02:14:55 +08:00
|
|
|
CMD ["docker-entrypoint.sh"]
|