nexdrew / rekcod

docker inspect :mag: → docker run :runner:
ISC License
371 stars 32 forks source link

Doesn't retreive IP addresses #78

Open codefaux opened 3 years ago

codefaux commented 3 years ago

Using docker ( alias rekcod='docker run --name rekcod --rm -i -v /var/run/docker.sock:/var/run/docker.sock nexdrew/rekcod' ) on a container created by Portainer (likely not relevant?) it fails to recover specified IP addresses.

Obviously I've pruned the output here for privacy as much as I can be bothered, but I didn't remove any parameters (except volumes) and merely censored/changed network topology information.

[root@monster ~]# rekcod mediamanagers_tdarr-node_1
docker run --name mediamanagers_tdarr-node_1 --runtime nvidia -v /docker/media-managers/tdarr-node/configs:/app/configs:rw -v /docker/media-managers/tdarr-node:/app/logs:rw --net secondary_lan --restart unless-stopped -h 22d83964b657 --expose ---/tcp --expose ---/tcp --expose ---/tcp -l com.docker.compose.config-hash='210fa5c1e45a4b5085fa8026849f7b01fd867f7eb7f1deeab0b90f4bae27b555' -l com.docker.compose.container-number='1' -l com.docker.compose.oneoff='False' -l com.docker.compose.project='mediamanagers' -l com.docker.compose.project.config_files='/data/compose/4/docker-compose.yml' -l com.docker.compose.project.working_dir='/data/compose/4' -l com.docker.compose.service='tdarr-node' -l com.docker.compose.version='1.27.4' -e 'TZ=America/Los_Angeles' -e 'PUID=1006' -e 'PGID=100' -e 'GIDLIST=100,989,986' -e 'UMASK_SET=002' -e 'nodeID=---' -e 'nodeIP=---.---.---.---' -e 'nodePort=---' -e 'serverIP=---.---.---.---' -e 'serverPort=---' -e 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' -e 'UMASK=002' -e 'PORT1=---' -e 'PORT2=---' -e 'LANGUAGE=en_US.UTF-8' -e 'LANG=' -e 'LC_ALL=' -e 'DEBIAN_FRONTEND=noninteractive' -e 'LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri/' -e 'LD_LIBRARY_PATH=/usr/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64' -e 'S6_REL=2.0.0.1' -e 'NODE_VERSION=14' -e 'NODE_PORT=---' -d --entrypoint "/init" haveagitgat/tdarr_node:latest

(While it's on my mind - is there a way we can "pretty-print" that with newlines via argument to rekcod? That would make life easier. I tried to run it with no parameters to check options and had to kill the docker PID to get my ssh terminal back. YIKES.)

There's clearly a lot of junk there created by the container and/or Portainer, but the relevant section of the Stack (Portainer's docker-compose wrapper thing) is such;

  tdarr-node:
    image: haveagitgat/tdarr_node:latest
    runtime: nvidia
    restart: unless-stopped
    networks:
      primary_lan:
        ipv4_address:  192.168.1.1
    environment:
      - TZ=America/Los_Angeles
      - PUID=1006
      - PGID=100
      - GIDLIST=100,989,986
      - UMASK_SET=002
      - nodeID=---
      - nodeIP=---.---.---.---
      - nodePort=--
      - serverIP=---.---.---.---
      - serverPort=--
    volumes:
      - /docker/media-managers/tdarr-node/configs:/app/configs
      - /docker/media-managers/tdarr-node:/app/logs

Importantly - the networks//ipv4_address tag is not being caught. Sorry for so much extra information, didn't want to overly prune it and invalidate the issue.