Initial commit, definitely not done yet
This commit is contained in:
commit
295edcd693
5 changed files with 73 additions and 0 deletions
14
.drone.yml
Normal file
14
.drone.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build and push
|
||||||
|
image: plugins/docker
|
||||||
|
pull: always
|
||||||
|
settings:
|
||||||
|
repo: askiiart/certbot-nginx
|
||||||
|
tags: latest
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
6
Dockerfile
Normal file
6
Dockerfile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
FROM python:3.12-alpine
|
||||||
|
WORKDIR /etc/nginx
|
||||||
|
RUN pip install certbot certbot-nginx
|
||||||
|
RUN apk add nginx
|
||||||
|
COPY run.sh /root
|
||||||
|
ENTRYPOINT ["/root/run.sh"]
|
37
README.md
Normal file
37
README.md
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# docker-createrepo_c
|
||||||
|
|
||||||
|
[![Build Status](https://drone.askiiart.net/api/badges/askiiart/docker-certbot-nginx/status.svg?ref=refs/heads/main)](https://drone.askiiart.net/askiiart/docker-certbot-nginx)
|
||||||
|
|
||||||
|
`createrepo_c` in a Docker container
|
||||||
|
|
||||||
|
## Running
|
||||||
|
|
||||||
|
Example `docker run`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d -e CERTBOT_DNS_PLUGIN=certbot-dns-cloudflare -v ./nginx-conf:/etc/nginx docker.askiiart.net/askiiart/certbot-nginx --version
|
||||||
|
```
|
||||||
|
|
||||||
|
Example `docker-compose.yml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
hugo:
|
||||||
|
image: docker.askiiart.net/askiiart/certbot-nginx
|
||||||
|
environment:
|
||||||
|
- CERTBOT_DNS_PLUGIN=certbot-dns-cloudflare
|
||||||
|
volumes:
|
||||||
|
- ./nginx-conf:/etc/nginx
|
||||||
|
command: --version
|
||||||
|
```
|
||||||
|
|
||||||
|
### Environment Variables
|
||||||
|
|
||||||
|
| Variable | Description | Default |
|
||||||
|
| ------------------ | ----------------------------- | ------- |
|
||||||
|
| CERTBOT_DNS_PLUGIN | The certbot dns plugin to use | none |
|
||||||
|
|
||||||
|
## 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=certbot-nginx
|
||||||
|
ID=$(docker build . -q)
|
||||||
|
|
||||||
|
docker tag ${ID} ${ORG}/${NAME}:latest
|
||||||
|
docker push ${ORG}/${NAME}:latest
|
8
run.sh
Executable file
8
run.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
if [ -z "$CERTBOT_DNS_PLUGIN" ]; then
|
||||||
|
echo "No DNS plugin set, continuing"
|
||||||
|
else
|
||||||
|
pip install $CERTBOT_DNS_PLUGIN
|
||||||
|
fi
|
||||||
|
|
||||||
|
certbot $@
|
Loading…
Reference in a new issue