Last active
December 4, 2016 19:38
-
-
Save jonatassalgado/f3594903fa26654342323a4a28e41626 to your computer and use it in GitHub Desktop.
Dockerfile for Meteorjs from Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2' | |
| services: | |
| db: | |
| image: mongo:3 | |
| command: mongod --nojournal --smallfiles --quiet --logpath=/dev/null | |
| app: | |
| build: . | |
| depends_on: | |
| - db | |
| ports: | |
| - "3000:3000" | |
| volumes: | |
| - .:/app | |
| command: meteor | |
| environment: | |
| - MONGO_URL=mongodb://mongodb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:trusty | |
| ENV APP_DIR /app | |
| # Dependencies | |
| RUN apt-get update -qq && apt-get install -y \ | |
| build-essential \ | |
| libpq-dev \ | |
| nodejs \ | |
| libqt4-dev \ | |
| libqtwebkit-dev \ | |
| unzip \ | |
| wget \ | |
| curl | |
| # Nodejs | |
| RUN curl -sL https://deb.nodesource.com/setup | bash - | |
| RUN apt-get install -yq nodejs | |
| RUN npm install -g npm | |
| # Meteorjs | |
| RUN curl https://install.meteor.com/ | sh | |
| RUN meteor npm install | |
| # User not root | |
| RUN adduser --disabled-password --gecos '' dev | |
| USER dev | |
| # Folder and volumes | |
| RUN mkdir -p $APP_DIR | |
| WORKDIR $APP_DIR | |
| ADD . $APP_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment