File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ name : docker
3+ type : knowledge
4+ version : 1.0.0
5+ agent : CodeActAgent
6+ triggers :
7+ - docker
8+ - container
9+ ---
10+
11+ # Docker Installation and Usage Guide
12+
13+ ## Installation on Debian/Ubuntu Systems
14+
15+ To install Docker on a Debian/Ubuntu system, follow these steps:
16+
17+ ``` bash
18+ # Update package index
19+ sudo apt-get update
20+
21+ # Install prerequisites
22+ sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release
23+
24+ # Add Docker's official GPG key
25+ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
26+
27+ # Set up the stable repository
28+ echo " deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $( lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
29+
30+ # Update package index again
31+ sudo apt-get update
32+
33+ # Install Docker Engine
34+ sudo apt-get install -y docker-ce docker-ce-cli containerd.io
35+ ```
36+
37+ ## Starting Docker in Container Environments
38+
39+ If you're in a container environment without systemd (like this workspace), start Docker with:
40+
41+ ``` bash
42+ # Start Docker daemon in the background
43+ sudo dockerd > /tmp/docker.log 2>&1 &
44+
45+ # Wait for Docker to initialize
46+ sleep 5
47+ ```
48+
49+ ## Verifying Docker Installation
50+
51+ To verify Docker is working correctly, run the hello-world container:
52+
53+ ``` bash
54+ sudo docker run hello-world
55+ ```
56+
You can’t perform that action at this time.
0 commit comments