8000 GitHub - soil55/Node
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

soil55/Node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nodejs app Docker example

A Simple nodejs app using docker

Authors

Docker Deployment steps

  • Building your image

Go to the directory that has your Dockerfile and run the following command to build the Docker image. The -t flag lets you tag your image so it's easier to find later using the docker images command:

  docker build . -t node-web-app

Docker app run

  • Your image will now be listed by Docker:
  docker images

Docker app run

  • Run the image Running your image with -d runs the container in detached mode, leaving the container running in the background. The -p flag redirects a public port to a private port inside the container. Run the image you previously built:
  docker run -p 3000:3000 -d node-web-app
  • Get container ID
  docker ps
  • Print app output
  docker logs <container id>

Docker app run

Tech Stack

Server: Node, Express, Docker

Hit api "http://localhost:3000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0