When running develop.sh it will build a node development container in interactive mode (bash) your code folder is shared as a volume into the container workdir meaning you can edit the files in your favorite IDE/Code editor without the need to restart it.
Last active
August 9, 2017 14:59
-
-
Save danfromisrael/13061cb22e8b763719a1077ed857e31f to your computer and use it in GitHub Desktop.
Docker container only for development (node.js)
This file contains 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
#dont copy my computer node_modules into the container | |
node_modules |
This file contains 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
docker-compose run web bash |
This file contains 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: '3' | |
services: | |
web: | |
build: . | |
ports: | |
- "8080:8080" | |
volumes: | |
- .:/usr/src/app | |
- node_modules:/usr/src/app/node_modules | |
volumes: | |
node_modules: {} |
This file contains 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 node:boron | |
# Create app directory | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
# Install app dependencies | |
COPY package.json /usr/src/app/ | |
RUN npm install | |
EXPOSE 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment