Initial commit
This commit is contained in:
commit
6ededfc443
4 changed files with 49 additions and 0 deletions
6
Dockerfile
Normal file
6
Dockerfile
Normal 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
28
README.md
Normal 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
8
build-and-push.sh
Executable 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
7
run.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
while :
|
||||
do
|
||||
createrepo_c /repo
|
||||
sleep $(($DELAY * 60))
|
||||
done
|
Loading…
Reference in a new issue