美文网首页
为 Meteor 应用构建 Docker 镜像

为 Meteor 应用构建 Docker 镜像

作者: 耀得嘛 | 来源:发表于2019-04-30 18:40 被阅读0次

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"]

相关文章

网友评论

      本文标题:为 Meteor 应用构建 Docker 镜像

      本文链接:https://www.haomeiwen.com/subject/yexbnqtx.html