File tree Expand file tree Collapse file tree 6 files changed +36
-59
lines changed Expand file tree Collapse file tree 6 files changed +36
-59
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,13 @@ jobs:
25
25
with :
26
26
images : scalified/cron
27
27
tags : |
28
- type=raw,value=alpine
29
28
type=raw,value=latest
30
29
type=semver,pattern={{version}}
31
30
- name : Build and push Docker image
32
31
uses : docker/build-push-action@v5
33
32
with :
34
33
context : .
35
34
push : true
36
- build-args :
37
- ALPINE_VERSION=${{ github.ref_type == 'tag' && github.ref_name || 'latest' }}
38
35
tags : ${{ steps.meta.outputs.tags }}
39
36
labels : ${{ steps.meta.outputs.labels }}
40
37
Original file line number Diff line number Diff line change 1
- ARG ALPINE_VERSION="latest"
2
-
3
- FROM scalified/supervisor:${ALPINE_VERSION}
1
+ FROM scalified/supervisor
4
2
5
3
ARG CRONTABS_DIR
6
4
ENV CRONTABS_DIR ${CRONTABS_DIR:-/etc/crontabs}
7
5
8
- ARG CRON_STDOUT_FILE
9
- ENV CRON_STDOUT_FILE ${CRON_STDOUT_FILE:-/var/log/crond-stdout.log}
10
-
11
- ARG CRON_STDERR_FILE
12
- ENV CRON_STDERR_FILE ${CRON_STDERR_FILE:-/var/log/crond-stderr.log}
6
+ RUN echo "BUSYBOX (CROND) VERSION: $(busybox | head -n 1)"
13
7
14
- COPY config /supervisor-cron.ini $SUPERVISOR_CONF_DIR
8
+ COPY etc /supervisor.d/ $SUPERVISOR_CONF_DIR/
15
9
16
10
VOLUME $CRONTABS_DIR
17
-
18
11
VOLUME /etc/periodic
19
12
20
- RUN touch $CRON_STDOUT_FILE $CRON_STDERR_FILE
21
-
22
- COPY entrypoint.sh /entrypoint.sh
23
-
24
- ENTRYPOINT /entrypoint.sh
25
-
Original file line number Diff line number Diff line change 1
- # Docker Cron
1
+ # CRON Docker Image
2
2
3
+ [ ![ Release] ( https://img.shields.io/github/v/release/Scalified/docker-cron?style=flat-square )] ( https://github.com/Scalified/docker-cron/releases/latest )
3
4
[ ![ Docker Pulls] ( https://img.shields.io/docker/pulls/scalified/cron.svg )] ( https://hub.docker.com/r/scalified/cron )
5
+ [ ![ License] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://github.com/Scalified/docker-cron/blob/master/LICENSE )
4
6
5
- ## Description
7
+ ## Overview
6
8
7
- This repository is used for building a [ ** Docker** ] ( https://www.docker.com ) image containing [ ** Cron** ] ( https://en.wikipedia.org/wiki/Cron )
9
+ [ ** Alpine ** ] ( https://www.alpinelinux.org/ ) [ ** Docker** ] ( https://www.docker.com/ ) image running [ ** Cron** ] ( https://en.wikipedia.org/wiki/Cron )
8
10
9
- ## Dockerhub
11
+ ## Usage
10
12
11
- ** ` docker pull scalified/cron ` **
13
+ ### Running
12
14
13
- ## Supported build arguments
14
-
15
- * ` CRONTABS_DIR ` - the directory where system wide crontab is located (default ` /etc/crontabs ` )
16
- * ` CRON_STDOUT_FILE ` - the log file used to output cron's stdout
17
- * ` CRON_STDERR_FILE ` - the log file used to output cron's stderr
18
-
19
- ## Volumes
20
-
21
- * ** ` /etc/crontabs ` ** , unless ` CRONTABS_DIR ` argument overrides it
22
-
23
- ### How-To
24
-
25
- #### Building Docker Image
26
-
27
- ` docker build . -t scalified/cron:<tag> `
28
-
29
- #### Running Docker Image
30
-
31
- ` docker run -it scalified/cron /bin/sh `
15
+ ``` bash
16
+ docker run \
17
+ --name cron \
18
+ -v crontab:/etc/crontabs/crontab:ro \
19
+ --detach \
20
+ --restart always \
21
+ scalified/cron
22
+ ```
32
23
33
24
## Scalified Links
34
25
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ [program:cron]
2
+ command =crond -f -L /dev/stdout -c %(ENV_CRONTABS_DIR)s
3
+ priority =2
4
+ autostart =true
5
+ autorestart =true
6
+ startsecs =5
7
+ stdout_logfile =/dev/stdout
8
+ stdout_logfile_maxbytes =0
9
+ stdout_logfile_backups =0
10
+ stdout_capture_maxbytes =0
11
+ stdout_events_enabled =true
12
+ stdout_syslog =false
13
+ stderr_logfile =/dev/stderr
14
+ stderr_logfile_maxbytes =0
15
+ stderr_logfile_backups =0
16
+ stderr_capture_maxbytes =0
17
+ stderr_events_enabled =true
18
+ stderr_syslog =false
You can’t perform that action at this time.
0 commit comments