Is NGINX Container supposed to start after a reboot of the host VM?

2 questions!

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?)

2 - Also, unless I’m missing a trick, has it been acknowledged that the instructions at Greenbone Community Containers - Greenbone Community Documentation aren’t completely “noob” friendly?

The install instructions suggest -

curl -f -O -L https://greenbone.github.io/docs/latest/_static/compose.yaml --output-dir “$DOWNLOAD_DIR”

But then say to

docker compose -f $DOWNLOAD_DIR/docker-compose.yml pull

That won’t work because the downloaded file is actually compose.yaml unless you rename it after download?

Simple enough for anyone that understands what each command is doing but /shrug

Edit - clarification

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.

Hi,

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.

1 Like

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.

2 Likes

The most “noob” friendly way to get started with OPENVAS SCAN, you can get a copy of the Greenbone Free virtual appliance. The Kali Linux install is usually pretty hassle free too.