Skip to content

Commit 46fe665

Browse files
committed
feat: 1.37.0
1 parent fc8a38d commit 46fe665

File tree

6 files changed

+36
-59
lines changed

6 files changed

+36
-59
lines changed

.github/workflows/docker-image.yml renamed to .github/workflows/publish.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,13 @@ jobs:
2525
with:
2626
images: scalified/cron
2727
tags: |
28-
type=raw,value=alpine
2928
type=raw,value=latest
3029
type=semver,pattern={{version}}
3130
- name: Build and push Docker image
3231
uses: docker/build-push-action@v5
3332
with:
3433
context: .
3534
push: true
36-
build-args:
37-
ALPINE_VERSION=${{ github.ref_type == 'tag' && github.ref_name || 'latest' }}
3835
tags: ${{ steps.meta.outputs.tags }}
3936
labels: ${{ steps.meta.outputs.labels }}
4037

Dockerfile

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
1-
ARG ALPINE_VERSION="latest"
2-
3-
FROM scalified/supervisor:${ALPINE_VERSION}
1+
FROM scalified/supervisor
42

53
ARG CRONTABS_DIR
64
ENV CRONTABS_DIR ${CRONTABS_DIR:-/etc/crontabs}
75

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)"
137

14-
COPY config/supervisor-cron.ini $SUPERVISOR_CONF_DIR
8+
COPY etc/supervisor.d/ $SUPERVISOR_CONF_DIR/
159

1610
VOLUME $CRONTABS_DIR
17-
1811
VOLUME /etc/periodic
1912

20-
RUN touch $CRON_STDOUT_FILE $CRON_STDERR_FILE
21-
22-
COPY entrypoint.sh /entrypoint.sh
23-
24-
ENTRYPOINT /entrypoint.sh
25-

README.md

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,25 @@
1-
# Docker Cron
1+
# CRON Docker Image
22

3+
[![Release](https://img.shields.io/github/v/release/Scalified/docker-cron?style=flat-square)](https://github.com/Scalified/docker-cron/releases/latest)
34
[![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)
46

5-
## Description
7+
## Overview
68

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)
810

9-
## Dockerhub
11+
## Usage
1012

11-
**`docker pull scalified/cron`**
13+
### Running
1214

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+
```
3223

3324
## Scalified Links
3425

config/supervisor-cron.ini

Lines changed: 0 additions & 8 deletions
This file was deleted.

entrypoint.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

etc/supervisor.d/supervisor-cron.ini

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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

0 commit comments

Comments
 (0)