Skip to content

Commit fc8a38d

Browse files
committed
Actions Update
1 parent a946c8d commit fc8a38d

File tree

4 files changed

+14
-28
lines changed

4 files changed

+14
-28
lines changed

.github/workflows/docker-image.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
id: meta
2424
uses: docker/metadata-action@v5
2525
with:
26-
images: scalified/alpine-cron
26+
images: scalified/cron
2727
tags: |
2828
type=raw,value=alpine
2929
type=raw,value=latest
@@ -33,5 +33,8 @@ jobs:
3333
with:
3434
context: .
3535
push: true
36+
build-args:
37+
ALPINE_VERSION=${{ github.ref_type == 'tag' && github.ref_name || 'latest' }}
3638
tags: ${{ steps.meta.outputs.tags }}
3739
labels: ${{ steps.meta.outputs.labels }}
40+

Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM scalified/alpine-supervisor:3.20.0
1+
ARG ALPINE_VERSION="latest"
22

3-
ARG PERIODIC_DIR=/etc/periodic
3+
FROM scalified/supervisor:${ALPINE_VERSION}
44

55
ARG CRONTABS_DIR
66
ENV CRONTABS_DIR ${CRONTABS_DIR:-/etc/crontabs}
@@ -13,12 +13,9 @@ ENV CRON_STDERR_FILE ${CRON_STDERR_FILE:-/var/log/crond-stderr.log}
1313

1414
COPY config/supervisor-cron.ini $SUPERVISOR_CONF_DIR
1515

16-
RUN mkdir -p $CRONTABS_DIR \
17-
$PERIODIC_DIR
18-
1916
VOLUME $CRONTABS_DIR
2017

21-
VOLUME $PERIODIC_DIR
18+
VOLUME /etc/periodic
2219

2320
RUN touch $CRON_STDOUT_FILE $CRON_STDERR_FILE
2421

README.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,34 @@
1-
# Alpine Cron Docker #
1+
# Docker Cron
22

3-
[![Docker Pulls](https://img.shields.io/docker/pulls/scalified/alpine-cron.svg)](https://hub.docker.com/r/scalified/alpine-cron)
4-
[![](https://images.microbadger.com/badges/image/scalified/alpine-cron.svg)](https://microbadger.com/images/scalified/alpine-cron)
5-
[![](https://images.microbadger.com/badges/version/scalified/alpine-cron.svg)](https://microbadger.com/images/scalified/alpine-cron)
3+
[![Docker Pulls](https://img.shields.io/docker/pulls/scalified/cron.svg)](https://hub.docker.com/r/scalified/cron)
64

75
## Description
86

9-
This repository is used for building a Docker image containing [**Cron**](https://en.wikipedia.org/wiki/Cron)
10-
running on [**Alpine Linux**](https://alpinelinux.org/)
7+
This repository is used for building a [**Docker**](https://www.docker.com) image containing [**Cron**](https://en.wikipedia.org/wiki/Cron)
118

129
## Dockerhub
1310

14-
**`docker pull scalified/alpine-cron`**
15-
16-
## Version
17-
18-
| Tag | Alpine Version |
19-
|----------------|----------------|
20-
| latest, 3.20.0 | 3.20.0 |
21-
| 3.18.2 | 3.18.2 |
22-
| 3.9 | 3.9 |
23-
| 3.4 | 3.4 |
11+
**`docker pull scalified/cron`**
2412

2513
## Supported build arguments
2614

2715
* `CRONTABS_DIR` - the directory where system wide crontab is located (default `/etc/crontabs`)
28-
* `PERIODIC_DIR` - the top level directory containing daily, weekly, monthly, and security subdirectories which contain standard system periodic executables (default `/etc/periodic`)
2916
* `CRON_STDOUT_FILE` - the log file used to output cron's stdout
3017
* `CRON_STDERR_FILE` - the log file used to output cron's stderr
3118

3219
## Volumes
3320

3421
* **`/etc/crontabs`**, unless `CRONTABS_DIR` argument overrides it
35-
* **`/etc/periodic`**, unless `PERIODIC_DIR` argument overrides it
3622

3723
### How-To
3824

3925
#### Building Docker Image
4026

41-
`docker build . -t scalified/alpine-cron:<tag>`
27+
`docker build . -t scalified/cron:<tag>`
4228

4329
#### Running Docker Image
4430

45-
`docker run -it scalified/alpine-cron /bin/sh`
31+
`docker run -it scalified/cron /bin/sh`
4632

4733
## Scalified Links
4834

config/supervisor-cron.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[program:cron]
2-
command=crond -f -L %(ENV_CRON_STDOUT_FILE)s
2+
command=crond -f -L %(ENV_CRON_STDOUT_FILE)s -c %(ENV_CRONTABS_DIR)s
33
priority=2
44
autostart=true
55
autorestart=true

0 commit comments

Comments
 (0)