GitXplorerGitXplorer
s

docker-cron

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
f273346bd0e015fa053452165b6dae3dbc24eb85

Support Python 3.11

ssrittau committed 2 years ago
Unverified
1514da8a186bb48e5267a0ed4167092227b1ca83

Don't install dependencies automatically

ssrittau committed 3 years ago
Unverified
0e0639822ce172c0bb7b9d575b56ea89060b0b98

Build against Python 3.10 as well

ssrittau committed 3 years ago
Unverified
04b26ec0f13155d3a83fff986f839292e1e3d189

Use bullseye base container

ssrittau committed 3 years ago
Unverified
26e35b7d7f6b60ea514f3b7109937478c8230ac8

Quote values in env file

ssrittau committed 3 years ago
Unverified
aea3ca2b70d9b11b0f05907528866a2d885fb734

Add support for /app/env

ssrittau committed 3 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.