Notifications
Clear all
Command Line
1
Posts
1
Users
0
Reactions
109
Views
Topic starter
Add Apt Repository
# Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update
Install Docker Packages
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Run Test
sudo docker run hello-world
Build Commands
Build
docker build -t <image_name>
Docker Compose
docker-compose up -d
Commands
Open Shell
docker exec -it <container_name> sh
Clean Up
Remove old Images
docker image prune --all
Remove networks, stopped containers and volumes
docker system prune --all
This topic was modified 3 months ago by Valley Community
This topic was modified 2 months ago by Andre Tiltman
Posted : 05/08/2024 11:23 am