Add a new container
Select Containers from the menu then click Add container.
![](https://docs.portainer.io/~gitbook/image?url=https%3A%2F%2F3752558522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiZWHJxqQsgWYd9sI88sO%252Fuploads%252Fg95LajHm0mb6ctiBsaxe%252F2.15-docker_containers_add_container.gif%3Falt%3Dmedia%26token%3Dccd75a7e-725d-4283-b58e-266d92669ef4&width=768&dpr=4&quality=100&sign=e95daff&sv=1)
Configure the container settings as required.
Image configuration section
Field/Option | Overview |
---|---|
Name | Give the container a descriptive name. |
Registry | Select the registry that contains the image that you want to use for your container. |
Image | Enter the name of the image you want to use. |
Always pull the image | Toggle on to enforce pulling the image from the registry instead of using the locally cached copy (if you have used the image previously). |
![](https://docs.portainer.io/~gitbook/image?url=https%3A%2F%2F3752558522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiZWHJxqQsgWYd9sI88sO%252Fuploads%252FmcICNbGSFmIxA8gmoily%252F2.15-docker_containers_image_config.png%3Falt%3Dmedia%26token%3D0323eede-0ca9-4cc2-ac3b-dee43b7bb46e&width=768&dpr=4&quality=100&sign=66e65b53&sv=1)
When using Docker Hub you can use the Search button to search for the image you have entered, and ensure that you have the correct name and tag. Portainer also displays the number of pulls remaining for your Docker Hub account when using an anonymous account.
Alternatively you can switch to advanced mode to manually enter registry and image details. This is useful if you want to do a one-off container deployment from a registry that isn't configured within Portainer.
![](https://docs.portainer.io/~gitbook/image?url=https%3A%2F%2F3752558522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiZWHJxqQsgWYd9sI88sO%252Fuploads%252FatZq7K79S5lo1upclK6X%252F2.15-docker_containers_image_config_simple.png%3Falt%3Dmedia%26token%3Db70a1c08-8f48-45df-9292-7baaa069b9ae&width=768&dpr=4&quality=100&sign=5dae5a8e&sv=1)
Webhooks
Toggle Create a container webhook on to create a webhook for the container. You can send a POST request to this endpoint to automate pulling the most up-to-date image and re-deploy your container.
![](https://docs.portainer.io/~gitbook/image?url=https%3A%2F%2F3752558522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiZWHJxqQsgWYd9sI88sO%252Fuploads%252FhJdfhQIxDKvjBpDJ0TbT%252F2.15-docker_container_webhook.png%3Falt%3Dmedia%26token%3D9240352b-c317-40be-bbfb-785b1667c110&width=768&dpr=4&quality=100&sign=f0d64f49&sv=1)
Network ports configuration section
Field/Option | Overview |
---|---|
Publish all exposed network ports to random host ports | Toggle on to allow Portainer to randomly assign ports on the host to the exposed ports in the container. |
Manual network port publishing | Click publish a new network port to create manual port mappings for the container. |
![](https://docs.portainer.io/~gitbook/image?url=https%3A%2F%2F3752558522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiZWHJxqQsgWYd9sI88sO%252Fuploads%252FT2FPD4tTzJcoF7CIgeQs%252F2.15-docker_container_network_port_config.png%3Falt%3Dmedia%26token%3D2f22ce34-f65a-47eb-b9f9-e93d08dbf2e7&width=768&dpr=4&quality=100&sign=1e306dc8&sv=1)
Actions section
Field/Option | Overview |
---|---|
Auto remove | Toggle this option on to automatically remove the container once it exits. This is useful if you want to run a container only once. |
![](https://docs.portainer.io/~gitbook/image?url=https%3A%2F%2F3752558522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiZWHJxqQsgWYd9sI88sO%252Fuploads%252FfZWYqQtcI6oRYCElbkEZ%252F2.15-docker_container_actions.png%3Falt%3Dmedia%26token%3D0dde7420-b4de-43f8-b80f-4727715752fe&width=768&dpr=4&quality=100&sign=b8c6467&sv=1)
Once complete, set any advanced options (see below) then click Deploy the container. If successful your container will be shown in the container list.
Advanced container settings
Choose from a range of options to customize the deployment.
![](https://docs.portainer.io/~gitbook/image?url=https%3A%2F%2F3752558522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FiZWHJxqQsgWYd9sI88sO%252Fuploads%252FcOjVxr3MXIwGU67888ys%252F2.15-containers-advanced.png%3Falt%3Dmedia%26token%3D7be96a5c-9f07-4ee6-a766-1235e168cf13&width=768&dpr=4&quality=100&sign=eaf16acb&sv=1)
Last updated