- Added `services/certbot/Dockerfile` for Certbot configuration with Ubuntu 22.04. - Set up volumes, dependencies, and command for automatic certificate renewal. - Corrected Nginx configuration file path in `services/nginx/Dockerfile`.
19 lines
599 B
Docker
19 lines
599 B
Docker
FROM ubuntu:22.04
|
|
LABEL author="Jeppe B"
|
|
|
|
# Set the volume for certbot
|
|
VOLUME ["/etc/letsencrypt", "/var/lib/letsencrypt"]
|
|
|
|
# Install dependencies
|
|
RUN apt-get update && \
|
|
apt-get install -y certbot python3-certbot-nginx && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create a directory for certbot
|
|
RUN mkdir -p /etc/letsencrypt
|
|
# Set the working directory
|
|
WORKDIR /etc/letsencrypt
|
|
# Expose port 80 for the standalone server
|
|
EXPOSE 80
|
|
# Command to run certbot in standalone mode
|
|
CMD ["certbot", "renew", "--standalone", "--non-interactive", "--agree-tos", "--email", "jb@truckwash.dk", "--no-eff-email"] |