# Instalare Docker pe Ubuntu

### Pasul 1: Șterge versiuni vechi

```bash
sudo apt remove docker docker.io -y
```

***

### Pasul 2: Instalare

```bash
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io -y
```

***

### Pasul 3: Pornește Docker

```bash
sudo systemctl start docker
sudo systemctl enable docker
```

***

### Pasul 4: Test

```bash
docker run hello-world
```

***

### Pasul 5: Fără sudo

```bash
sudo usermod -aG docker $USER
newgrp docker
```

***

### Comenzi utile

```bash
docker ps
docker images
```

***

### Gata 🐳

Docker este pregătit.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ititanhosting.ro/docs/romana/vps/linux/instalare-docker-pe-ubuntu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
