Skip to content

Commit

Permalink
Actions Update
Browse files Browse the repository at this point in the history
  • Loading branch information
vbaidak committed May 26, 2024
1 parent a946c8d commit fc8a38d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 28 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: scalified/alpine-cron
images: scalified/cron
tags: |
type=raw,value=alpine
type=raw,value=latest
Expand All @@ -33,5 +33,8 @@ jobs:
with:
context: .
push: true
build-args:
ALPINE_VERSION=${{ github.ref_type == 'tag' && github.ref_name || 'latest' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM scalified/alpine-supervisor:3.20.0
ARG ALPINE_VERSION="latest"

ARG PERIODIC_DIR=/etc/periodic
FROM scalified/supervisor:${ALPINE_VERSION}

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

COPY config/supervisor-cron.ini $SUPERVISOR_CONF_DIR

RUN mkdir -p $CRONTABS_DIR \
$PERIODIC_DIR

VOLUME $CRONTABS_DIR

VOLUME $PERIODIC_DIR
VOLUME /etc/periodic

RUN touch $CRON_STDOUT_FILE $CRON_STDERR_FILE

Expand Down
26 changes: 6 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,34 @@
# Alpine Cron Docker #
# Docker Cron

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

## Description

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

## Dockerhub

**`docker pull scalified/alpine-cron`**

## Version

| Tag | Alpine Version |
|----------------|----------------|
| latest, 3.20.0 | 3.20.0 |
| 3.18.2 | 3.18.2 |
| 3.9 | 3.9 |
| 3.4 | 3.4 |
**`docker pull scalified/cron`**

## Supported build arguments

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

## Volumes

* **`/etc/crontabs`**, unless `CRONTABS_DIR` argument overrides it
* **`/etc/periodic`**, unless `PERIODIC_DIR` argument overrides it

### How-To

#### Building Docker Image

`docker build . -t scalified/alpine-cron:<tag>`
`docker build . -t scalified/cron:<tag>`

#### Running Docker Image

`docker run -it scalified/alpine-cron /bin/sh`
`docker run -it scalified/cron /bin/sh`

## Scalified Links

Expand Down
2 changes: 1 addition & 1 deletion config/supervisor-cron.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[program:cron]
command=crond -f -L %(ENV_CRON_STDOUT_FILE)s
command=crond -f -L %(ENV_CRON_STDOUT_FILE)s -c %(ENV_CRONTABS_DIR)s
priority=2
autostart=true
autorestart=true
Expand Down

0 comments on commit fc8a38d

Please sign in to comment.