Problems installing HA Supervisor on Docker

I try do run HA supervisor on docker but with limited success.
I use this script:

NAME=hassio_supervisor
IMAGE=homeassistant/amd64-hassio-supervisor:latest

ID=`docker ps -aqf name="$IMAGE"`
docker container stop $NAME
#docker rm $NAME $NAME
echo "y" | docker system prune

$PWD/config:/usr/src/app/config      $IMAGE
docker run -d --name=$NAME \
        -v /var/run/docker.sock:/var/run/docker.sock \
        -v /var/run/dbus:/var/run/dbus \
        -v $PWD/data:/data \
        --net=host \
        -e SUPERVISOR_SHARE=$PWD/data \
        -e SUPERVISOR_NAME=hassio_supervisor \
        -e HOMEASSISTANT_REPOSITORY=data/qemux86-64-homeassistant \
        --security-opt seccomp=unconfined \
        --privileged \
        --restart always \
        $IMAGE

The container starts, but faiils with the following error:

23-01-28 12:27:49 ERROR (SyncWorker_0) [supervisor.docker.interface] Can't install ghcr.io/home-assistant/4-homeassistant:landingpage: 500 Server Error for http+docker://localhost/v1.41/images/create?tag=landingpage&fromImage=ghcr.io%2Fhome-assistant%2F4-homeassistant&platform=linux%2Famd64: Internal Server Error ("Head "https://ghcr.io/v2/home-assistant/4-homeassistant/manifests/landingpage": denied")
23-01-28 12:27:49 WARNING (MainThread) [supervisor.homeassistant.core] Fails install landingpage, retry after 30sec

What am I douing wrong?
any help is appreciated:)

You cannot install supervised in docker container

You want HA Core for docker
You may install HAOS directly on the host or install supervised HA in a VM.

Well - it works now.
The mail problem was he ‘net=host’ argument.
The script creates a lot of “hassio_…” containers and a homasssistant container.
It now looks like this:

NAME=hassio_supervisor
IMAGE=homeassistant/amd64-hassio-supervisor:latest

docker container stop hassio_audio hassio_cli hassio_dns hassio_multicast hassio_observer hassio_su>
docker rm $(docker ps --filter status=exited -q)

echo "y" | docker system prune

docker run -d --name=$NAME \
        -v /var/run/docker.sock:/var/run/docker.sock \
        -v /var/run/dbus:/var/run/dbus \
        -v $PWD/config:/data \
        -e SUPERVISOR_SHARE=$PWD/config \
        -e SUPERVISOR_NAME=hassio_supervisor \
        -e HOMEASSISTANT_REPOSITORY=homeassistant/qemux86-64-homeassistant \
        --security-opt seccomp=unconfined \
        --security-opt apparmor=unconfined \
        --privileged \
        --restart always \
        $IMAGE

So, you got a working docker supervisor homeassistant combination?

I love HA, but the fact of missing addons and backup solution inside docker install is just annoying.

If this is a working solution this should go into the setup documentation of HA! :slight_smile:

Maybe you can tell me how your experience was with this kind of setup

cheers

Hi @oz8et
Is it still working for you? I had to modify the docker compose to this, but it just " Preparing Home Assistant", and nothing happened.

version: '3'
services:
  hassio_supervisor:
    image: homeassistant/amd64-hassio-supervisor:latest
    container_name: hassio_supervisor
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/run/dbus:/var/run/dbus
      - ./config:/data
    environment:
      - SUPERVISOR_SHARE=./config
      - SUPERVISOR_NAME=hassio_supervisor
      - HOMEASSISTANT_REPOSITORY=homeassistant/qemux86-64-homeassistant
    security_opt:
      - seccomp=unconfined
      - apparmor=unconfined
    privileged: true
    restart: always
    cpus: 2
    mem_limit: 4G
    networks:
      - hassio-net

networks:
  hassio-net:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.30.32.0/24