Skip to content

Commit

Permalink
Change name to cron-socat. Remove build-args.
Browse files Browse the repository at this point in the history
  • Loading branch information
11matt556 authored Jun 19, 2023
1 parent f2be239 commit d718087
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gitlab-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run: |
git config --global user.name "Github Actions"
git config --global user.email "[email protected]"
git remote set-url origin "https://oauth2:${{ secrets.GITLAB_PROJECT_TOKEN }}@gitlab.com/11matt556/docker-cron.git"
git remote add old https://github.com/11matt556/socat-cron.git
git remote set-url origin "https://oauth2:${{ secrets.GITLAB_PROJECT_TOKEN }}@gitlab.com/11matt556/cron-socat.git"
git remote add old https://github.com/11matt556/cron-socat.git
git fetch --unshallow old
git push origin master --force
5 changes: 2 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
types: [published]

env:
DOCKER_HUB: docker.io/11matt556/socat-cron
GITHUB_CONTAINER: ghcr.io/11matt556/socat-cron
DOCKER_HUB: docker.io/11matt556/cron-socat
GITHUB_CONTAINER: ghcr.io/11matt556/cron-socat

jobs:
push_to_registries:
Expand Down Expand Up @@ -49,4 +49,3 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: alpine_socat_version=${{ github.ref_name }}
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
ARG alpine_socat_version

FROM alpine/socat:${alpine_socat_version}
FROM alpine/socat:1.7.4.4

# Create Crontab directories
RUN mkdir /etc/periodic/1min \
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[![Publish Docker Image](https://github.com/11matt556/socat-cron/actions/workflows/publish.yml/badge.svg?event=release)](https://github.com/11matt556/socat-cron/actions/workflows/publish.yml)
[![Push changes to Gitlab](https://github.com/11matt556/socat-cron/actions/workflows/gitlab-push.yml/badge.svg?event=push)](https://github.com/11matt556/socat-cron/actions/workflows/gitlab-push.yml)

# Socat-Cron
# cron-socat
Forked from djpic's [docker-images](https://gitlab.com/djpic/docker-images) project on Gitlab.

Removed non-cron items, modified to use alpine/socat instead of alpine, removed fastcgi, and switched CI/CD to Github Actions.

My purpose for this is as a simple scheduler for docker container actions without Docker Swarm or k8s. The idea is to pass through docker.sock and communicate with the socket with socat to control containers on the host.

## Source Repo
* [Github](https://github.com/11matt556/socat-cron)
* [Gitlab (mirror)](https://gitlab.com/11matt556/docker-cron)
* [Github](https://github.com/11matt556/cron-socat)
* [Gitlab (mirror)](https://gitlab.com/11matt556/cron-socat)

## Docker Image
* [GHCR](https://github.com/11matt556/socat-cron/pkgs/container/socat-cron)
* [Dockerhub](https://hub.docker.com/r/11matt556/socat-cron)
* [GHCR](https://github.com/11matt556/socat-cron/pkgs/container/cron-socat)
* [Dockerhub](https://hub.docker.com/r/11matt556/cron-socat)

# How to use
Mount script(s) into the directories below to run them at the associated interval:
Expand Down Expand Up @@ -45,8 +45,8 @@ services:

# CI/CD
This project uses Github actions for the following:
* Mirror from [GitHub](https://github.com/11matt556/socat-cron) to [GitLab](https://gitlab.com/11matt556/docker-cron)
* Publish Github releases to [GHCR](https://github.com/11matt556/socat-cron/pkgs/container/socat-cron) and [Dockerhub](https://hub.docker.com/r/11matt556/socat-cron)
* Mirror from [GitHub](https://github.com/11matt556/cron-socat) to [GitLab](https://gitlab.com/11matt556/cron-socat)
* Publish Github releases to [GHCR](https://github.com/11matt556/socat-cron/pkgs/container/cron-socat) and [Dockerhub](https://hub.docker.com/r/11matt556/cron-socat).

# Credits
* https://hub.docker.com/r/djpic/cron
Expand Down
2 changes: 1 addition & 1 deletion dev_build.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker build --build-arg alpine_socat_version=latest --tag 11matt556/socat-cron:dev .
docker build --build-arg alpine_socat_version=latest --tag 11matt556/cron-socat:dev .
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

echo "Based on https://hub.docker.com/repository/docker/djpic/cron"
echo "For more information: https://github.com/11matt556/socat-cron"
echo "For more information: https://github.com/11matt556/cron-socat"
echo "Starting Docker Container..."

crond -f -l 8 -d 8 -L /dev/stdout

0 comments on commit d718087

Please sign in to comment.