If you have existing Docker containers which you'd like to update to start automatically upon boot, you can run the following command:
docker update --restart=always CONTAINER_NAME
There are a couple of restart policies which you'd might like to consider, as the always restart policy is suitable for our requirements.
Next, to ensure Tomcat starts upon boot, it first needs to be enabled as a service. You should have a file called tomcat.service in /etc/systemd/system
Simply run the following command to enable the Tomcat service to be automatically started at boot:
sudo systemctl enable tomcat