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.
Forked from danfromisrael/..nodejs-development-container.md
Created
August 9, 2017 14:59
-
-
Save kantharia/3739dcafe827fa2979e22bea1f276bf7 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