Clone the repo:
git clone https://github.com/stevenliebregt/docker-compose-lemp-stack.git
Download the source files (44GB)
https://cildata.crbs.ucsd.edu/media/scicrunch/scicrunch_full_backup_20251027.tar.gz
tar -xvzf scicrunch_full_backup_20251027.tar.gz
"mv /docker /"
"mv /etc/certs /etc"
"mv /ncmir_db /"
"mkdir /mysql-backups"
Docker build:
cd docker-compose-lemp-stack
docker build
docker compose up -d
Open a bash terminal to the php container:
docker exec -it scicrunch-php bash
Tempory fix for the PHP mysqli extension
apt-get update
apt-get install -y libzip-dev unzip pkg-config libpng-dev libjpeg-dev libonig-dev libxml2-dev
docker-php-ext-install mysqli
docker restart scicrunch-php
Commit the container to a new image
docker ps
Example: docker commit <container_name_or_id> <new_image_name>:<tag>
It should look something like the following:
docker commit 3accee63a78a scicrunch-php-with-mysqli:latest
Then, modify docker-compose.yml
Comment out the php build and change it to image: scicrunch-php-with-mysqli
Test the MariaDB connection
docker exec -it scicrunch-mariadb bash
mysql -u root
show databases;
use nif_eelg_beta;
show tables;
Test the PHP connection to the database
Run the PHP test:
php /var/www/testDB.php