- moved ssl key generation into container

- mount html and webdav as volume
This commit is contained in:
2025-02-23 13:31:02 +01:00
parent 0c30086b37
commit 4deb3de6eb
8 changed files with 6 additions and 72 deletions
+1 -10
View File
@@ -6,18 +6,9 @@ RUN apt-get update && \
apt-get install -y vim && \
rm -rf /var/lib/apt/lists/*
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/localhost.key -out /etc/ssl/certs/localhost.crt -subj "/C=US/ST=YourState/L=YourCity/O=YourOrganization/CN=localhost"
RUN htpasswd -nb davuser davuser > /var/www/.htpasswd
# Copy your PHP application into the default Apache document root
COPY ./public-html/ /var/www/html/
COPY ./webdav/ /var/www/webdav/
RUN chown -R root:www-data /var/www/
# Copy SSL certificate and key
COPY ssl/localhost.crt /etc/ssl/certs/localhost.crt
COPY ssl/localhost.key /etc/ssl/private/localhost.key
# Copy the custom Apache virtual host config
COPY conf/my-httpd-vhosts.conf /etc/apache2/sites-available/my-ssl.conf
COPY conf/webdav.conf /etc/apache2/sites-available/webdav.conf