tiredofit/docker-traefik-cloudflare-companion

exec: python3: not found

marleyjaffe opened this issue · 6 comments

After upgrading my docker containers today I started to receive a python3 error. Below is the section of my docker compose file as well as the relevant log lines. The last section just keeps repeating. Everything goes back to working if I change from latest to v5.0.0

  cf-companion:
    container_name: cf-companion
    image: tiredofit/traefik-cloudflare-companion:latest
    security_opt:
      - no-new-privileges:true
    restart: unless-stopped
    networks:
      - socket_proxy
    depends_on:
      - socket-proxy
    # volumes:
    #  - /var/run/docker.sock:/var/run/docker.sock:ro # Use Docker Socket Proxy instead for improved security
    environment:
      - TIMEZONE=$TZ
      - TRAEFIK_VERSION=2
      - CF_EMAIL=$CLOUDFLARE_EMAIL # Same as traefik
      # - CF_TOKEN=$CLOUDFLARE_API_TOKEN # Scoped api token not working. Error 10000.
      - CF_TOKEN=$CLOUDFLARE_API_KEY # Same as traefik
      - TARGET_DOMAIN=$DOMAINNAME
      - DOMAIN1=$DOMAINNAME
      - DOMAIN1_ZONE_ID=$CLOUDFLARE_ZONEID # Copy from Cloudflare Overview page
      - DOMAIN1_PROXIED=TRUE
      - DOCKER_HOST=tcp://socket-proxy:2375
      - CONTAINER_LOG_LEVEL=DEBUG
    secrets: # not working
      - cloudflare_email
      - cloudflare_api_key
      - cloudflare_zoneid
today at 9:31 PM [cont-init.d] 99-container: executing...
today at 9:31 PM [DEBUG] ** [container] Getting ready to start '03-zabbix' service
today at 9:31 PM [DEBUG] ** [container] Skipping '04-cron' service for startup routines
today at 9:31 PM [DEBUG] ** [container] Skipping '05-smtp' service for startup routines
today at 9:31 PM [DEBUG] ** [container] Getting ready to start '10-cloudflare-companion' service
today at 9:31 PM [cont-init.d] 99-container: exited 0.
today at 9:31 PM [cont-init.d] done.
today at 9:31 PM [services.d] starting services
today at 9:31 PM [DEBUG] ** [traefik-cloudflare-companion] Checking to see if container initialization scripts have completed
today at 9:31 PM [DEBUG] ** [traefik-cloudflare-companion] Checking to see if service has initialized
today at 9:31 PM [DEBUG] ** [zabbix] Checking to see if container initialization scripts have completed
today at 9:31 PM [DEBUG] ** [zabbix] Checking to see if service has initialized
today at 9:31 PM [services.d] done.
today at 9:31 PM ./run: line 11: exec: python3: not found
today at 9:31 PM [INFO] ** [traefik-cloudflare-companion] Starting Traefik Cloudflare Companion
today at 9:31 PM [INFO] ** [zabbix] Starting Zabbix Agent
today at 9:31 PM Starting Zabbix Agent [alpine]. Zabbix 5.0.3 (revision {ZABBIX_REVISION}).
today at 9:31 PM Press Ctrl+C to exit.
today at 9:31 PM
today at 9:31 PM [DEBUG] ** [traefik-cloudflare-companion] Checking to see if container initialization scripts have completed
today at 9:31 PM [DEBUG] ** [traefik-cloudflare-companion] Checking to see if service has initialized
today at 9:31 PM [INFO] ** [traefik-cloudflare-companion] Starting Traefik Cloudflare Companion
today at 9:31 PM ./run: line 11: exec: python3: not found
today at 9:31 PM [DEBUG] ** [traefik-cloudflare-companion]

Can you give me the hash of the image throwing problems?

Had same issue. Here is debug log:
2020-09-03T06:11:49.539453849Z [DEBUG] /etc/cont-init.d/99-container ** [container] Getting ready to start '03-zabbix' service
2020-09-03T06:11:49.540144623Z + ln -sf /etc/services.available/03-zabbix /etc/services.d
2020-09-03T06:11:49.541245983Z + for services in /etc/services.available/*/
2020-09-03T06:11:49.541479495Z + service=/etc/services.available/04-cron
2020-09-03T06:11:49.542198460Z + '[' -f /tmp/state/04-cron-init ']'
2020-09-03T06:11:49.542998582Z + grep -q DONOTSTART /tmp/state/04-cron-init
2020-09-03T06:11:49.548476481Z + print_debug 'Skipping '''04-cron''' service for startup routines'
2020-09-03T06:11:49.548844634Z + output_off
2020-09-03T06:11:49.549522553Z + '[' TRUE = TRUE ']'
2020-09-03T06:11:49.549530461Z + set +x

2020-09-03T06:11:49.590784997Z [INFO] /etc/services.available/10-cloudflare-companion/run ** [traefik-cloudflare-companion] Starting Traefik Cloudflare Companion
2020-09-03T06:11:49.590882372Z + exec python3 -u /usr/sbin/cloudflare-companion

Looks like a similar issue to #14.

In the meantime, a workaround is to use tag 6.1.2 rather than the latest tag.

Looks like latest tag didn't build in python

I'll force Docker Hub to rebuild - We have seen this before, and it doesn't make much sense, unless their build engine is not parsing the RUN commands properly. Should be about 5 minutes for a new one to build.

Interesting. I just built a new latest from Docker Hub, pulled and it was missing python3. I then turned off "Build Caching" and ran another build and it appeared. I'll do some research why this would be happening - but in the meantime I've turned it off entirely and the image should be usable again, sorry about this!

Amazing thanks for the update. I'll pull the new image and use that. For reference, this is the has that was causing issues: sha256:82a583ee1771024c89e3865daf453244a70da82c4ce87da4a8b0b527505dd753