Skip to content

Instantly share code, notes, and snippets.

@LucianBuzzo
Last active August 29, 2018 08:18
Show Gist options
  • Select an option

  • Save LucianBuzzo/ec6f48f3da67b02d7312572faa120e96 to your computer and use it in GitHub Desktop.

Select an option

Save LucianBuzzo/ec6f48f3da67b02d7312572faa120e96 to your computer and use it in GitHub Desktop.
Run an existing node project inside a docker container
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