# Docker

> Official documents: [docker docs](https://docs.docker.com/)

## install using the repository

ref: [Install Docker Engine on Ubuntu](https://docs.docker.com/engine/install/ubuntu/)

### uninstall old versions

```
sudo apt remove docker docker-engine docker.io containerd runc
```

### set up the repository

* Update apt package and install packages

```
$ sudo apt-get update

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
```

* Add Docker's offical GPG key and verify

```
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

$ sudo apt-key fingerprint 0EBFCD88
pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <docker@docker.com>
sub   rsa4096 2017-02-22 [S]
```

* Set up the stable repository

```
$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
```

### install docker engine

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

### verify docker

```
$ which docker
/usr/bin/docker
```

## Demo

### RSSHub

[RSSHub docs](https://docs.rsshub.app/)

* download RSSHub image

```
sudo docker pull diygod/rsshub
```

* run RSSHub

```
sudo docker run -d --name rsshub -p 1200:1200 diygod/rsshub
```

* stop RSSHub

```
sudo docker stop rsshub
```

* remove RSSHub

```
sudo docker stop rsshub
sudo docker rm rsshub
```


---

# 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://litreily.gitbook.io/notes/gitbook/software/docker.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.
