docker:portainer:create_container
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docker:portainer:create_container [2021/02/05 15:41] – created peter | docker:portainer:create_container [2021/02/05 16:42] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Docker - Portainer - Create Container ====== | ====== Docker - Portainer - Create Container ====== | ||
+ | |||
+ | ===== Log into Portainer ===== | ||
+ | |||
+ | Navigate to **127.0.0.1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Select the Local Docker ===== | ||
+ | |||
+ | Select your local docker: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Add Container ===== | ||
+ | |||
+ | Navigate to **Containers**. | ||
+ | |||
+ | Click **Add Container**. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Create Container ===== | ||
+ | |||
+ | * Name: **PiHole**. | ||
+ | * image: **pihole/ | ||
+ | * Publish all exposed network ports to random host ports: | ||
+ | * **53: | ||
+ | * **53: | ||
+ | * **67: | ||
+ | * **80: | ||
+ | * **443: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Map some volumes ==== | ||
+ | |||
+ | In **Advanced container settings**: | ||
+ | |||
+ | * Click on the **Volumes** tab. | ||
+ | * Click **map additional volume**. | ||
+ | * Container: | ||
+ | * **/ | ||
+ | * **Bind**. | ||
+ | * Host: | ||
+ | * **/ | ||
+ | * **Bind**. | ||
+ | * Click **map additional volume**. | ||
+ | * Container: | ||
+ | * **/ | ||
+ | * **Bind**. | ||
+ | * Host: | ||
+ | * **/ | ||
+ | * **Bind**. | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | The / | ||
+ | </ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Set up the network ==== | ||
+ | |||
+ | This also sets the DNS the image should use. | ||
+ | |||
+ | In **Advanced container settings**: | ||
+ | |||
+ | * Click on the **Network** tab. | ||
+ | * Network: | ||
+ | * Hostname: | ||
+ | * Primary DNS Server: | ||
+ | * Secondary DNS Server: | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | The secondary DNS server can be any other DNS server you prefer. | ||
+ | </ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Set the Environment ==== | ||
+ | |||
+ | Ensures that Pi-hole starts automatically. | ||
+ | |||
+ | In **Advanced container settings**: | ||
+ | |||
+ | * Click on the **Env** tab. | ||
+ | * Click **Add environment variable**. | ||
+ | * Name: **TZ** | ||
+ | * Value: | ||
+ | * Click **Add environment variable**. | ||
+ | * Name: **DNS1** | ||
+ | * Value: | ||
+ | * Click **Add environment variable**. | ||
+ | * Name: **DNS2** | ||
+ | * Value: | ||
+ | * Click **Add environment variable**. | ||
+ | * Name: **WEBPASSWORD** | ||
+ | * Value: | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | If only 1 upstream DNS server is wanted, put **no** as the value for the **DNS2** variable, otherwise it will default to Google secondary DNS server 8.8.4.4. | ||
+ | |||
+ | It is recommended to have two upstream DNS servers in case one goes down. | ||
+ | |||
+ | </ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Set the Restart Policy ==== | ||
+ | |||
+ | Ensures that Pi-hole starts automatically. | ||
+ | |||
+ | In **Advanced container settings**: | ||
+ | |||
+ | * Click on the **Restart Policy** tab. | ||
+ | * Click **Unless Stopped**. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Deploy the Container ==== | ||
+ | |||
+ | Click **Deploy the Container**. | ||
docker/portainer/create_container.1612539678.txt.gz · Last modified: 2021/02/05 15:41 by peter