/wakeonlan-cron-docker

A Docker container to wake up a computer on a schedule.

Primary LanguageShell

wakeonlan-cron-docker

A Docker container to wake up a computer on a schedule.

Docker Hub Docker Hub GitHub release

GitHub last commit Docker build

Instructions

Vanilla Docker

docker run \
  ghcr.io/axeleroy/wakeonlan-cron-docker:latest \
  -e "TZ=Europe/Paris" \
  -e "CRON=20 4 * * *" \
  -e "MAC_ADDRESS=AA:BB:CC:DD:EE:FF" \
  --network="host"

Docker-compose

version: "2.1"
services:
  wake-on-lan:
    image: ghcr.io/axeleroy/wakeonlan-cron-docker:latest
    environment:
      - TZ=Europe/Paris
      - CRON=20 4 * * *
      - MAC_ADDRESS=AA:BB:CC:DD:EE:FF
    network_mode: host

Environment variables

Variable Meaning Example
TZ Timezone TZ=Europe/Paris
CRON Cron schedule expression (tip: use crontab.guru) CRON=20 4 * * *
MAC_ADDRESS Mac address of the computer you want to wake up MAC_ADDRESS=AA:BB:CC:DD:EE:FF
BROADCAST_IP IP address of the subnet to broadcast the magic packet to BROADCAST_IP=192.168.0.255
CRON_LOG_LEVEL Log level of crond. Goes from 0 (most verbose) to 8 (default) CRON_LOG_LEVEL=2