Initial commit

This commit is contained in:
askiiart 2023-08-27 20:31:51 -05:00
commit 6ededfc443
No known key found for this signature in database
GPG key ID: 85505F3A2264FA01
4 changed files with 49 additions and 0 deletions

6
Dockerfile Normal file
View file

@ -0,0 +1,6 @@
FROM debian:12-slim
WORKDIR /repo
COPY run.sh /root
RUN apt update
RUN apt install createrepo-c -y
CMD /root/run.sh

28
README.md Normal file
View file

@ -0,0 +1,28 @@
# docker-createrepo_c
`createrepo_c` in a Docker container
## Running
Example `docker run`:
```bash
docker run -d -e DELAY=5 -v /path/to/repo:/repo docker.askiiart.net/askiiart/createrepo_c
```
Example `docker-compose.yml`:
```yaml
version: '3.7'
services:
hugo:
image: docker.askiiart.net/askiiart/createrepo_c
environment:
- DELAY=5
volumes:
- /path/to/repo:/repo
```
## Building
1. Run `docker build .`

8
build-and-push.sh Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
ORG=askiiart
NAME=createrepo_c
ID=$(docker build . -q)
docker tag ${ID} ${ORG}/${NAME}:latest
docker push ${ORG}/${NAME}:latest

7
run.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
set -e
while :
do
createrepo_c /repo
sleep $(($DELAY * 60))
done