0% found this document useful (0 votes)
4 views2 pages

Docker Commands and HTML Setup Guide

The document outlines commands for managing Docker containers, including updating packages, installing Docker, and creating, stopping, and deleting containers. It also details how to create a container registry and push images to it, along with a sample HTML code for a landing page. Key commands and steps are provided for executing these tasks effectively.

Uploaded by

aditya.naidu2024
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Docker Commands and HTML Setup Guide

The document outlines commands for managing Docker containers, including updating packages, installing Docker, and creating, stopping, and deleting containers. It also details how to create a container registry and push images to it, along with a sample HTML code for a landing page. Key commands and steps are provided for executing these tasks effectively.

Uploaded by

aditya.naidu2024
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Module 5 Commands:

Assignment 1:

-> sudo apt update


-> sudo apt upgrade -y
-> sudo apt-get install [Link]
-> sudo service docker status
-> sudo docker pull hshar/webapp
-> sudo docker images
-> sudo docker ps -a
-> sudo docker run -itd --name {name} hshar/webapp (Command to create container)
-> sudo docker stop {containerid} -> To stop the container
-> sudo docker rm {containerid} -> To delete the container
-> sudo docker exec -it webapp bash
-> -it to start an interative session
-> -i stands for interactive -t for terminal and bash for starting a new bash shell
session in our containers

-> cd /var/www/html
-> rm [Link]
-> nano [Link] (paste the source code over there)
-> ctrl + s (to save)
-> ctrl + x (to exit)

-> exit (for exiting container)

Assignment 2:

Create a container registry

-> sudo docker commit {container_name} {login_server_name}/foldername


To Login into your ACR
-> sudo docker login {login_server_name}
-> copy username from ACR (access keys by enabling the admin user)

-> sudo docker push {image_name} (to push an image to ACR)


-> [Link]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
*{
padding: 0;
margin: 0;
}
body{
font-family: sans-serif;
}
.conatiner{
width: 100%;
min-height: 100vh;
background-color: #272927;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: aliceblue;

}
img{
width: 300px;
height: auto;
display: block;
margin-bottom: 10px;
}
</style>
<title>Document</title>
</head>
<body>
<div class="conatiner">
<div class="image">
<img src="[Link]
alt="" srcset="">
</div>
<h1>Welcome to Intellipaat</h1>
</div>
</body>
</html>

You might also like