I am trying to dockerize a meteor application (v1.6.1) by building a docker image using Dockerfile
and creating and running a container using docker-compose.yml
but all my trials failed.
I have used this command to build a docker meteor image
docker build -t badis/meteor .
I have a good experience using meteor and little using docker.
Here my Dockerfile
FROM node:carbon
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN curl https://install.meteor.com/?release=1.6.1 | sh
RUN npm install
# If you are building your code for production
# RUN npm install --only=production
# Bundle app source
COPY . .
EXPOSE 8080
CMD [ "npm", "start" ]
Here my .dockerignore
node_modules
npm-debug.log
Here my docker-compose.yml
dashboard:
image: badis/meteor
ports:
- "81:80"
links:
- mongo
environment:
- MONGO_URL=mongodb://mongo/boiler
- ROOT_URL=http://localhost
mongo:
image: mongo:3.2
The error is quite self-explanatory. You need to pass --allow-superuser
when running the meteor build command.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.