GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fullstack-interview-resources/Docker at _vikrant · vikrant-d1/fullstack-interview-resources

Expand file tree

/

Docker

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

Docker

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
README.md
README.md
 
 

README.md

Outline

Docker

1.Run node app in local enviroment with docker container

FROM node:14
WORKDIR /app
COPY package.json .
RUN npm install
COPY . .
EXPOSE 3000
CMD [ "node", "app.js" ]

Docker commands to need to run docker project locally.

  • It documents that a process in the container will expose this port. But you still need to then actually expose the port with -p when running docker run. So technically, -p is the only required part when it comes to listening on a port. Still, it is a best practice to also add EXPOSE in the Dockerfile to document this behavior.
  1. docker build .
  2. docker run -p 3000:3000 de223hhue2

In last this is the docker image id this id you get if you run docker buid command

List of running container

  1. docker ps

Stop running container

  1. docker stop _________

In blank space write the running container name you get the running container name from "docker ps" command

2. To find built in image in docker

Docker hub

  • You can run built in image in docker e.g. "docker run node" here node is built in command.
  • Find the docker procesing image [docker ps -a]
  • changing the flag to interactive mode node image [docker run -it node]
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.