GitXplorerGitXplorer
s

docker-cron

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
6eabb9e48ff4517c8112cbae20485973b2aec012

Disable quoting of env file

ssrittau committed 3 months ago
Unverified
83c1e2e2bc2728cad7a3a8fde391ddac2550bdf6

Add Python 3.12 image, drop 3.9 and 3.10 images

ssrittau committed 9 months ago
Unverified
56013abba971490760d0d0fb5b53c2415eafdfcf

Remove version from compose file

ssrittau committed 9 months ago
Unverified
e286cb8ba2fcde7cc0813265f582b540ded7232a

Fix docker cron tag in README

ssrittau committed 2 years ago
Unverified
187a7cd61323b1e9af68b33550c8a40954a5c4c3

Introduce a -copy variant

ssrittau committed 2 years ago
Unverified
5c669ca29479a0630754b8705696653c7aa92ed8

Update default version to Python 3.11

ssrittau committed 2 years ago

README

The README file for this repository.

Base container for Python cron scripts

Installation

One of:

docker pull srittau/cron:latest-copy
docker pull srittau/cron:latest-onbuild

Usage

There are two variants of the image: onbuild and copy. The onbuild requires several files in your build directory:

  • A crontab file. A sample crontab is included. Python modules can be run using the /app/run-module.sh script.
  • A msmtprc configuration file. If you don't want to send mail, this file can be empty. A sample file is included.

In your Dockerfile:

FROM srittau/cron:3.11-onbuild

The copy variant requires you to copy your Python modules into the image yourself. In your Dockerfile:

FROM srittau/cron:3.11-copy

COPY ./crontab /etc/crontab
COPY ./msmtprc /root/.msmtprc

Copying the .msmtprc file is optional. By default, the image will not send mail.

Your Python modules should be copied into the /app/src directory in your image. You can also copy or mount a environment file to /app/env. Shell variables in this file are added to the environment before running your scripts.