Installion of homeassistant inside container docker fails

I try to install latest version of homeassistant inside docker container. But the container keeps restarting. Any help is appreciated.

[email protected]:~$ sudo docker logs hass
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] udev.sh: executing... 
exec: fatal: unable to exec bashio: No such file or directory
[cont-init.d] udev.sh: exited 127.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
version: '3'
services:
  home-assistant:
    image: homeassistant/home-assistant:stable
    container_name: "hass"
    restart: always
    ports:
      - 8123:8123
    volumes:
      - /home/user/homeassistant/config:/config
    network_mode: "host"

Tried the following

  1. removed all unused containers, volumes, images and pulled latest version. Still not working
  2. updated docker to latest version, still not working.

Let me guess: you used portainer ?

No actually.

My other containers had also started giving problems. So

  1. I stopped all containers
  2. docker image prune -a
  3. docker system prune

Then it was solved. I think one of image is corrupt. Most probably nginx. Hence even though I deleted container and restarted that particular image was not pulled since it was already in local. The image prune command with -a did the magic.