Spaces:
Build error
Build error
File size: 1,370 Bytes
51ff9e5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
---
name: docker
type: knowledge
version: 1.0.0
agent: CodeActAgent
triggers:
- docker
- container
---
# Docker Installation and Usage Guide
## Installation on Debian/Ubuntu Systems
To install Docker on a Debian/Ubuntu system, follow these steps:
```bash
# Update package index
sudo apt-get update
# Install prerequisites
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release
# Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# Set up the stable repository
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
# Update package index again
sudo apt-get update
# Install Docker Engine
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
```
## Starting Docker in Container Environments
If you're in a container environment without systemd (like this workspace), start Docker with:
```bash
# Start Docker daemon in the background
sudo dockerd > /tmp/docker.log 2>&1 &
# Wait for Docker to initialize
sleep 5
```
## Verifying Docker Installation
To verify Docker is working correctly, run the hello-world container:
```bash
sudo docker run hello-world
```
|