I run most apps on my Synology DS1515+ server using Docker containers. Some scripts on the Synology require referring to a container’s IP address. The problem is that a container’s IP address can change whenever it restarts. Restarts can happen for a variety of reasons:
- DSM’s automatic updates
- Updates to the Docker app
- Server reboot
This guide shows you how to determine the IP address of Docker container running on your Synology server.
Open the Docker app
Go to your list of containers
Double click on one of your running containers.
Go to the Terminal tab
Click on “Create”
You should see “bash” come up in your list of terminals. Click on it.
You’ll now see a terminal screen with an interactive prompt.
Enter in the below and press return:
ip addr show
You’ll get back something like this:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: sit0: <NOARP> mtu 1480 qdisc noop state DOWN link/sit 0.0.0.0 brd 0.0.0.0 66: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 02:42:ac:11:00:03 brd ff:ff:ff:ff:ff:ff inet 172.17.0.3/16 scope global eth0 valid_lft forever preferred_lft forever
What you are interested in is the information for
eth0, the container’s primary ethernet interface. The
inet (Internet address) line reveals the IP address of your container.
So in this example, the container’s IP address is