Dockerfile
FROM ubuntu
RUN apt-get update
RUN apt-get install -y curl
RUN curl https://install.meteor.com/ | sh
WORKDIR /src
COPY package.json /src
COPY .meteor/ /src/.meteor
ENV NODE_ENV=production
RUN meteor npm install --production
COPY . /src
RUN meteor build --directory /build --allow-superuser
FROM node:8-alpine
WORKDIR /app
COPY --from=0 /build/bundle /app
ENV NODE_ENV=production
RUN cd programs/server && npm install --production
ENV PORT=80
CMD ["node", "main.js"]
网友评论