Creating a container

In this page, you will be guided through the basic steps of container creation.

Searching and downloading images

In the Registry tab, you are able to import community repository that contains images uploaded by other developers. To help you get started, Synology has included Docker Hub, the largest image repository, as the default repository.

To create a container:

  1. Type in your keyword. (Here we will create Transmission container, a powerful downloader for HTTP, BT, NZB and more, as an example).
  2. In the search results, find the one you wish to use. Select it and hit the Download button on the top or simply double click to begin the download.
  3. Go to the Image tab and you should see your image listed.

To view information from an image's official page:

  1. Most of the time, the container creation requires some variable settings, and this information is often provided by the developer. Click the icon next to the image title.
  2. This will take you to the information page of the image. You are recommended to read the information and Dockerfile pages before Docker creation, as they provide essential information.
  3. In the Dockerfile page, we can locate the port number required for the container creation. (For example, in the Information page and Dockerfile page of gfjardim/transmission list important information like port number, volume name, and variables you need for the setup.)
  4. Depending on the image maintainer, the level of detail can vary. Sometimes it’s really easy to follow, sometimes the information is not that obvious and may require careful observation.

To create a container via wizard:

  1. In the Image tab, click Launch.
  2. Enter the following information:
    • Container Name: You may choose any name that has not been used by other containers.
    • Execute container using high privilege: You can give high privilege to execute container.
    • Enable resource limitation: You may manually set CPU usage priority. Leave this option unchecked if you want Docker to manage it for you.
  3. Click Advanced settings.
  4. Configure the following settings:
    • Advanced settings: To enable Auto-restart or not and to create a shortcut on Desktop or not.
      • Auto-restart: The container will try to restart after an abnormal shutdown or a Docker package reboot.
      • Create a shortcut on Desktop: For transmission, it has a WEB GUI for management so we may create a shortcut to easily access the interface. Enter the domain or IP address of your Synology NAS, followed by the local port set, which we suppose 8889 here.
    • Port Settings: Enter 9091 for container port as this is the default port advised in the Dockerfile page. Enter any used port on your Synology NAS, which we suppose 8889 here.
    • Volume: Since Transmission is a downloader, we need a way to access the file downloaded. Without mapping a physical shared folder on Synology NAS, all downloaded files will be stored in the containers and are difficult to retrieve. In Transmission’s Dockerfile page, we saw two volumes in Transmission: /config and /downloads. We will now perform the following to map these two volumes to the physical shared folders on Synology NAS:
    • Uncheck the Read-Only option as we need to grant Transmission permission to write data to the physical drives.

    • Network: You may choose networks you want to connect to. More details are in Network setting document.
    • Links: You may choose containers you want to link to. Containers are able to commute with each other by linking each other.
    • Environment: You may set environment variables and the execute commands of a container.
    • Since accessing Transmission requires credentials, we need to set accounts during the creation. From the Transmission document in Docker Hub, we have figured out the variables are called USERNAME and PASSWORD. Create them in Environment Variables. The variables have to be what are mentioned in the image’s help file, the value can be anything of your choice.

  5. Click Apply to go back to the general setting page.
  6. Click Next, and then you can see the setting summary.
  7. Check Run this container after the wizard is finished to automatically start the container.
  8. Click Apply to create the container.
  9. If container creation has been successful, you should see a shortcut icon on your desktop.
  10. Click on it to launch the application.
  11. Another tab will open and ask for your credentials. Enter the username and password you previously set in the wizard to grant the access.
  12. You will now enter the interface of the container you just created.

Note:

  • It’s always recommended to read the information pages of the images before creating containers as some information is required for the creation.
  • Since Docker Hub is the largest repository for Docker images, anyone can freely upload their customized images. If you are unable to create a container with correct settings, it could be because of issues with the quality of the image, and you are recommended to try another image.
  • When mapping container ports to the host, make sure the host port does not conflict with other current services. A port conflict may cause a service error. Refer to this FAQ article for the network ports already in use.
  • The default time zone of most containers is UTC. You can change it by setting an environmental variable. For example, set "TZ" as "Europe/Amsterdam". Visit here for more details on the list of time zones.