Skip to content

Commit d3ef98b

Browse files
Add Docker microagent for installation and usage (OpenHands#7027)
Co-authored-by: openhands <[email protected]>
1 parent 06cc1ef commit d3ef98b

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

microagents/knowledge/docker.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+

0 commit comments

Comments
 (0)