Last active
August 29, 2018 08:18
-
-
Save LucianBuzzo/ec6f48f3da67b02d7312572faa120e96 to your computer and use it in GitHub Desktop.
Run an existing node project inside a docker container
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
| docker run --name assignment -p 3001:3001 -dit node | |
| docker cp . assignment:app | |
| docker exec -it assignment bash | |
| # enter the app directory and install the project etc | |
| cd app && npm i | |
| # once you're done, clean up the container | |
| docker stop assignment | |
| docker rm assignment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment