# Install Docker Engine

ollow the steps below to get Docker up and running on your system. If you are missing an OS or you would like to learn more about Docker, please visit the official Docker page.&#x20;

<https://docs.docker.com/engine/install/>

**Prerequisites**

Before you begin, ensure that you have the following:

* A 64-bit version of your Linux distribution.
* Sudo privileges on the system.

### Installation Steps

You can go directly to the section of your OS:

* [Ub](#ubuntu)[untu](#ubuntu)
* [Raspberry Pi OS](#raspberry-pi-os)
* [Debian](#debian)
* [Alpine Linux](#alpine-linux)
* [Troubleshooting](#troubleshooting)

#### **Ubuntu**

1. **Update the Package Index**:

   ```bash
   sudo apt-get update
   ```
2. **Install Required Packages**:

   ```bash
   sudo apt-get install ca-certificates curl gnupg lsb-release
   ```
3. **Add Docker’s Official GPG Key**:

   ```bash
   sudo mkdir -p /etc/apt/keyrings
   curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
   ```
4. **Set Up the Docker Repository**:

   ```bash
   echo \
     "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
     $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
   ```
5. **Install Docker Engine**:

   ```bash
   sudo apt-get update
   sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
   ```
6. **Verify the Installation**:

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

#### Raspberry Pi OS

1. **Update the Package Index**:

   ```bash
   sudo apt-get update
   sudo apt-get upgrade
   ```
2. **Download and Run the Docker Installation Script**:

   ```bash
   curl -fsSL https://get.docker.com -o get-docker.sh
   sudo sh get-docker.sh
   ```
3. **Add Your User to the Docker Group**:

   ```bash
   sudo usermod -aG docker $USER
   ```
4. **Verify the Installation**:

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

#### Debian

1. **Update the Package Index**:

   ```bash
   sudo apt-get update
   ```
2. **Install Required Packages**:

   ```bash
   sudo apt-get install ca-certificates curl gnupg lsb-release
   ```
3. **Add Docker’s Official GPG Key**:

   ```bash
   sudo mkdir -p /etc/apt/keyrings
   curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
   ```
4. **Set Up the Docker Repository**:

   ```bash
   echo \
     "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
     $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
   ```
5. **Install Docker Engine**:

   ```bash
   sudo apt-get update
   sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
   ```
6. **Verify the Installation**:

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

#### Alpine Linux

1. **Update the Package Index**:

   ```bash
   sudo apk update
   ```
2. **Install Docker**:

   ```bash
   sudo apk add docker
   ```
3. **Start the Docker Daemon**:

   ```bash
   sudo service docker start
   ```
4. **Add Your User to the Docker Group**:

   ```bash
   sudo addgroup $USER docker
   ```
5. **Verify the Installation**:

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

### Post-Installation Steps

After installing Docker, you may want to configure Docker to start on boot:

```bash
sudo systemctl enable docker
```

To check the status of Docker:

```bash
sudo systemctl status docker
```

### Troubleshooting

If you encounter any issues, ensure that:

* Your system meets the prerequisites.
* You have followed each step correctly.
* You have a stable internet connection during the installation process.

As soon as the docker engine is up and running, you can go back to "Add Device" and continue with insalling the Agent on the device.


---

# 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.beeta.one/guides/add-device/install-docker-engine.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.
