Skip to content

Instantly share code, notes, and snippets.

@akshayithape-devops
Last active May 13, 2023 04:43
Show Gist options
  • Save akshayithape-devops/9f46e37060a6a082684018071874ab4c to your computer and use it in GitHub Desktop.
Save akshayithape-devops/9f46e37060a6a082684018071874ab4c to your computer and use it in GitHub Desktop.
Create First Docker Container for Apache Web Server

Create First Docker Container for Apache Web Server

Video Link : https://www.youtube.com/watch?v=J5jAvJTiw68&t=187s

  • Check Docker HTTPD image is available on local or not
docker images
  • Pull Apache HTTPD docker image
docker pull httpd
  • Verify that Apache HTTPD docker image is pulled successfully or not
docker images
  • Run first container called my-web
docker run -d -p 8080:80 --name my-web httpd
  • List running Docker processes
docker ps
  • Test the webserver is deployed in a container or not
curl http://localhost:8080
  • Stop running container
docker stop my-web
  • Remove stop container
docker stop my-web
  • Remove HTTPD docker image
docker rmi httpd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment