CDNShark Documentation

Docker Hosting

← Back to Documentation

Deploy a Docker Image

The quickest way to run one container: give an image, a name and the ports it listens on.

Steps

  1. Open Docker, click Manage on your host, then Deploy image.
  2. Fill in the form (below) and click Deploy.
  3. The image is pulled and the container started in the background. Progress appears in a live log at the top of the page.

The form

FieldWhat to enter
ImageAny image reference, for example nginx:alpine or ghcr.io/you/app:1.2. Private images need a registry login first: see Use a Private Registry.
Container nameLetters, numbers, dots, dashes and underscores, for example web.
PortsHost port → container port. The container port is the one your app listens on inside the container; the host port is the one you give a public URL later. Example: 8080 → 80 for nginx.
EnvironmentOne KEY=value per line. Lines starting with # are ignored. Leave it empty if the image needs none.
VolumesOne name:/path per line, for example appdata:/var/lib/app. Add :ro for read-only. Named volumes keep their data when the container is replaced or removed.
Restart policyUnless stopped (recommended) restarts the container after a crash and after the host restarts, unless you stopped it yourself.
Replace a container with the same nameTick it to update: the old container is removed and a new one started from the image. Named volumes are kept.

Update to a new version

Deploy again with the same container name, the new image tag and Replace ticked.

Start, stop, restart, remove

Each container in the Containers list has buttons for logs, restart, stop or start, and remove. Removing a container keeps its named volumes.

Next: Make Your App Public with an HTTPS URL.