Docker-compose environment not set

I’m running OH4.2.2 on a raspberry with Debian.
This is my docker-compose.yml:

  openhab:
    image: "openhab/openhab:4.2.2-debian"
    container_name: openhab
    restart: always
    network_mode: host
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
      - "./openhab_conf:/openhab/conf"
      - "./openhab_userdata:/openhab/userdata"
    environment:
      CRYPTO_POLICY: "unlimited"
      EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Amsterdam -Dorg.jupnp.network.useInterfaces=eth0 -Dorg.jupnp.network.useAddresses=10.0.XX.XX"
      OPENHAB_HTTP_PORT: "9080"
      OPENHAB_HTTPS_PORT: "9443"
      USER_ID: "1000"
      GROUP_ID: "1000

Unfortunately the environment variables are not set at all. If I check with docker exec openhab env none of these values is set. What’s wrong with my setup?

Certainly not a docker expert. I assume openhab is running (docker ps)?

for reference;

services:
  openhab:
    image: "openhab/openhab:milestone"
    restart: always
    network_mode: host
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/cont-init.d:/etc/cont-init.d"
      - "./openhab_addons:/openhab/addons"
      - "./openhab_conf:/openhab/conf"
      - "./openhab_userdata:/openhab/userdata"
    environment:
      CRYPTO_POLICY: "unlimited"
      EXTRA_JAVA_OPTS: "-Duser.timezone=America/New_York"
      OPENHAB_HTTP_PORT: "8080"
      OPENHAB_HTTPS_PORT: "8443"
      USER_ID: "1000"
      GROUP_ID: "1000"

and

openhabian@raspberrypi:~ $ docker exec openhab4-openhab-1 env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=raspberrypi
CRYPTO_POLICY=unlimited
EXTRA_JAVA_OPTS=-Duser.timezone=America/New_York
OPENHAB_HTTP_PORT=8080
OPENHAB_HTTPS_PORT=8443
USER_ID=1000
GROUP_ID=1000
EXTRA_SHELL_OPTS=
KARAF_EXEC=exec
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
OPENHAB_BACKUPS=/openhab/userdata/backup
OPENHAB_CONF=/openhab/conf
OPENHAB_HOME=/openhab
OPENHAB_LOGDIR=/openhab/userdata/logs
OPENHAB_USERDATA=/openhab/userdata
HOME=/root
openhabian@raspberrypi:~ $ docker ps
CONTAINER ID   IMAGE                        COMMAND                  CREATED      STATUS                PORTS                                       NAMES
4c38172d03bc   openhab/openhab:milestone    "/entrypoint gosu op…"   8 days ago   Up 8 days (healthy)
                                               openhab4-openhab-1