# Docker & Docker-Compose

## Docker

### Install

Prerequisites

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

Configure Docker apt repo

```
echo 'deb https://download.docker.com/linux/debian stretch stable' > /etc/apt/sources.list
```

Install

```
apt-get update
apt-get install docker.io docker-compose
```

### Creating a Docker Network

Creating a network allows us to throw all our containers into one network. Else, each container will have its own network.

```
docker network create --driver bridge containerz
```

![](/files/eKw9mslJ8Rq3bzCl1kkh)

### Verify

```
docker --version
```

![](/files/CSNlgnB621jvsJ7tnZIa)


---

# 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://homelab.4pfsec.com/system-services-software/docker-and-docker-compose.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.
