1 - Per the subject, I’m struggling to setup a fresh VM due to the docker pull EOF issues at the moment but I setup a working Ubuntu VM w/Docker a few weeks ago and found that if the VM was ever rebooted the NGINX container never started automatically.
There are a number of other stopped containers and I was never sure whether I should just start all that are stopped or just selective containers.
Is the expectation for NGINX to start after a reboot of the VM, or for first-timers to have to setup a cron job or similar to start the NGINX container on host reboot (and if so, any pointers?)
I’ve been in a support and/or admin role for 30~ years now but i’m not hot on *nix or docker yet
Reading between the lines I guess nginx isn’t starting because the compose.yaml does haven’t a restart value set and none of the other services are set to depend on nginx.
So after this weeks scans are done I’ll probably play around this -
Sounds like the following would change it to always start at boot
$ docker update --restart=always a7935b7a456b
But also altering the compose.yaml
for nginx: to include
restart: on-failure
or maybe put a dependency on openvas: (not sure if there’s another more appropriate) for
nginx:
condition: service_started
Anyways, hopefully I’ve answered my own question and no need for a cron job - hoping the above will fix up for when the host vm is updated in the future.
I updated the compose file for better restart policies. The required services are now restarted always.
Also I updated the docs to use compose.yaml instead of docker-compose.yml everywhere. This was just a leftover from renaming the file. docker-compose.yml is the old canonical name (from the Python based docker-compose v1 era) and nowadays the preferred name is compose.yaml. See https://docs.docker.com/compose/intro/compose-application-model/#the-compose-file for more details.
The aren’t noob friendly in the kind of you should have worked with docker compose already and for fulling some specific tasks you need to know compose details actually.