This image is for building Meteor based projects. As they output the relevant code on building there's no need to use this for deployment.
FROM webantic/meteor:8 as build
WORKDIR /usr/src/app
ARG NPM_TOKEN
COPY .npmrc.deploy .npmrc
COPY package*.json ./
RUN npm install
COPY . ./
RUN meteor build . --directory --allow-superuser
RUN cd bundle/programs/server && npm install --production
FROM node:8-slim as deploy
WORKDIR /usr/src/app
RUN npm -g install forever
COPY --from=build /usr/src/app/bundle ./
EXPOSE 80
CMD ["forever", "--minUptime", "5000", "--spinSleepTime", "500", "main.js"]
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
The NODE_VERSION build argument can be used to select which version of node to build from.
--build-arg NODE_VERSION=8.10.0
The METEOR_VERSION environment variable can be used to install a different version of meteor.
--build-arg METEOR_VERSION=1.6.1
docker build (--build-arg foo=bar...) -t webantic/meteor:8.10.0 -t webantic/meteor:8.10 -t webantic/meteor:8 -t webantic/meteor:latest .
NODE_VERSION variableAs the image is tagged as webantic/meteor it will automagically go to the right place
docker push webantic/meteor
Content type
Image
Digest
Size
444.9 MB
Last updated
almost 8 years ago
docker pull webantic/meteor