Skip to content

Commit 68ae6bf

Browse files
authored
Update lab1-docker-introduction.md
1 parent e81fc7d commit 68ae6bf

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

lab1-docker-introduction.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
1-
Here's the updated **Docker Assignment** with clear instructions for running Docker containers in each task:
2-
3-
---
4-
5-
### **Docker Assignment: Getting Started with Images and Containers**
6-
7-
#### **Objective:**
8-
Gain hands-on experience with Docker by pulling an image from Docker Hub, building a custom Docker image, running a container, and pushing the image back to Docker Hub.
1+
### Installation
2+
3+
Setup the Repo
4+
```
5+
# Add Docker's official GPG key:
6+
sudo apt-get update
7+
sudo apt-get install ca-certificates curl
8+
sudo install -m 0755 -d /etc/apt/keyrings
9+
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
10+
sudo chmod a+r /etc/apt/keyrings/docker.asc
11+
12+
# Add the repository to Apt sources:
13+
echo \
14+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
15+
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
16+
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
17+
sudo apt-get update
18+
```
19+
20+
Install Docker Community edition
21+
```
22+
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
23+
```
24+
25+
Run Hello world
26+
```
27+
sudo docker run hello-world
28+
```
929

1030
---
1131

0 commit comments

Comments
 (0)