docker-crontab icon indicating copy to clipboard operation
docker-crontab copied to clipboard

Does not work with DOCKER_HOST

Open RoboMagus opened this issue 4 years ago • 1 comments

I'm using the configuration below, and it complains about docker.sock: stat: can't stat '/var/run/docker.sock': No such file or directory


  crontab:
    image: willfarrell/crontab
    container_name: crontab
    restart: unless-stopped
    depends_on:
      - socket-proxy
    networks:
      - socket-proxy
    environment:
      - DOCKER_HOST=tcp://socket-proxy:2375
    volumes:
      - ./Volumes/crontab/logs:/var/log/crontab
      - ./Volumes/crontab/config:/opt/crontab

I suspect line 262 of docker-entrypoint, as this function will be called, regardless of whether we want to talk to the docker socket or when providing a DOCKER_HOST.

RoboMagus avatar Sep 27 '21 12:09 RoboMagus

As it was an easy fix I've implemented it in my fork so I could continue using CronTab in my docker stack. I created a PR to merge this small change back. See #47

RoboMagus avatar Sep 28 '21 07:09 RoboMagus