> For the complete documentation index, see [llms.txt](https://bridge-lab.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bridge-lab.gitbook.io/docs/tech/docker.md).

# Docker

### What is Docker?&#x20;

Docker packages an application together with everything it needs to run (code, tools, settings, libraries) into a neat little box called a **container**.

* **Container** → A self-contained app package
* **Image** → The blueprint used to create containers
* **Docker Desktop** → The app you install to use Docker easily

***

### Install Docker on Mac

1. Go to the Docker website
2. Download **Docker Desktop for Mac**
3. Open the downloaded file
4. Drag Docker into your Applications folder
5. Open Docker from Applications
6. Wait for it to start (you’ll see a whale icon in the menu bar)

***

### Install Docker on Windows

1. Go to the Docker website
2. Download **Docker Desktop for Windows**
3. Run the installer
4. Follow the prompts (you can keep default settings)
5. Restart your computer if asked
6. Open Docker Desktop

***

### Check That It Works

After installing, test Docker:

```bash
docker --version
```

If you see a version number, you’re good to go&#x20;

### Push a Docker Image

Build

{% code overflow="wrap" %}

```
docker build -t my-app .
```

{% endcode %}

Tag

{% code overflow="wrap" %}

```
docker tag my-app your_dockerhub_username/my-app:latest
```

{% endcode %}

Push

{% code overflow="wrap" %}

```
docker push your_dockerhub_username/my-app:latest
```

{% endcode %}

### Pull a Docker Image

{% code overflow="wrap" %}

```
docker pull your_dockerhub_username/my-app:latest
```

{% endcode %}
