Installing Docker and Portainer on Your Synology NAS
full course- Why Use Docker on Synology?
- Installing Docker on Synology DSM
- Installing Portainer in Docker on Synology
Although we can install and run docker containers directly in the synology docker package, I recommend installing portainer as a docker management tool. Portainer has a nice web based user interface, which means that you can access it directly via the browser instead of logging into the synology DSM and managing containers through the docker package. Additionally, it has some administration features that are not present in the synology docker package.
Open the package center. Filter to Installed packages. Locate the docker package and click on Open.
Click on the registry and search for portainer-ce
. Make sure to get the -ce image since the other image has been deprecated.
Double click on portainer-ce
. Choose the latest
tag and click select.
This will download the latest image to your synology. Click on the image tab on the menu and locate the image you just downloaded.
Create a new directory in your docker directory to store portainer data via the File Station
SSH into your synology and execute the following code:
$ sudo su -
# docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /volume1/docker/portainer:/data portainer/portainer-ce
This tells docker to start a new container using the
portainer/portainer-ce
image. Its going to expose the internal ports 8000 and 9000 as 8000 and 9000 externally. Its also going to make thedocker.sock
file available to the container and map the internal /data directory to yourdocker/portainer
directory.
Open up the docker application again and click on the Container tab in the menu. Confirm that a portainer container was created and is running.
Now open up the portainer console via the web browser. You can get there from your NAS ip and the portainer port (9000).
http://${your nas ip}:9000
You should get the authentication screen with prompt to create the admin account. I use the same username and password as my NAS, so that I don’t get locked out.
On the next page choose Docker as the container environment and click connect
This should get you into the portainer home page, click on local.
Click on containers in the navigation menu and you should see all of the containers that docker is currently running.
That’s it. You now have docker and portainer installed. Now to create some docker containers.
0 comments on “Installing Portainer in Docker on Synology”Add yours →