Dockerfile
FROM alpine
RUN apk update && apk add awake
ENV MAC_ADDRESS="" \
CRON_EXPRESSION="0 8 * * *"
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["sh", "/entrypoint.sh"]
entrypoint.sh
#!/bin/sh
echo "$CRON_EXPRESSION /usr/bin/awake $MAC_ADDRESS" > /etc/crontabs/root
crond -f -L /dev/stdout```
docker-compose
version: '3' services: nginx_proxy: container_name: cron_wol image: 'pcject/cron_wol:latest' restart: always network_mode: host environment: - 'MAC_ADDRESS=00:00:00:00:00:00' - 'CRON_EXPRESSION=*/5 * * * *'
Content type
Image
Digest
sha256:54960358b…
Size
22.1 MB
Last updated
over 3 years ago
docker pull pcject/cron_wol