FROM jkaninda/nginx-php-fpm # Install git and ssh-keygen RUN apt-get update && \ apt-get install -y git openssh-client && \ rm -rf /var/lib/apt/lists/* # Set the path to the SSH key pair ENV SSH_KEY_PATH=/root/.ssh/id_ed25519 # Check if the SSH key pair exists RUN if [ ! -f "$SSH_KEY_PATH" ]; then \ ssh-keygen -t ed25519 -N "" -f $SSH_KEY_PATH && \ echo "Generated SSH key pair:" && \ cat $SSH_KEY_PATH.pub; \ else \ echo "Using existing SSH key pair:" && \ cat $SSH_KEY_PATH.pub; \ fi # Nginx configuration COPY nginx.conf.dist /etc/nginx/nginx.conf COPY webhook.php /usr/share/nginx/html/webhook.php # Entrypoint.sh COPY 99-init-repos.sh /docker-entrypoint.d/99-init-repos.sh # Expose ports EXPOSE 80 # Fetch repo CMD ["nginx","-g","daemon: off;"]