diff --git a/Dockerfile b/Dockerfile index a9ec2f7..d68799e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,11 +10,13 @@ RUN dnf install -y \ dnf clean all && \ rm -rf /var/cache/dnf /usr/share/doc /usr/share/man /usr/share/locale/* -# Generate self-signed cert, create needed dirs, copy scripts, set permissions, install PHP, clean up +# Copy scripts into the image and set permissions +COPY ./scripts/ /scripts/ +RUN chmod +x /scripts/* + +# Generate self-signed cert, create needed dirs, install PHP, clean up RUN openssl req -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/localhost.key -x509 -days 3650 -subj "/CN=localhost" -out /etc/pki/tls/certs/localhost.crt && \ - mkdir -p /run/php-fpm/ /scripts && \ - cp -r /scripts/* /scripts/ && \ - chmod +x /scripts/* && \ + mkdir -p /run/php-fpm/ && \ /scripts/install-php$PHPVER.sh && \ rm -rf /tmp/*