phpMyAdmin - A web interface for MySQL and MariaDB

Docker phpMyAdmin - A web interface for MySQL and MariaDB

Currently reading
Docker phpMyAdmin - A web interface for MySQL and MariaDB

SynoMan

Administrator
Moderator
Founder
1,411
803
www.synoforum.com
NAS
DS720+, DS418play
Router
  1. RT2600ac
  2. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
SynoMan submitted a new resource:

phpMyAdmin - A web interface for MySQL and MariaDB - Tutorial for phpMyAdmin (PMA) in Docker

View attachment 2586
phpMyAdmin - A web interface for MySQL and MariaDB


In this tutorial, we are going to use this image: phpmyadmin/phpmyadmin


In DSM go to Docker -> Registry and search for phpmyadmin:

View attachment 2588

Download the second result, phpmyadmin/phpmyadmin image. Pick the latest image, when asked.

Once downloaded, go to the...

Read more about this resource...
 
Hi, i've tried and follow this tutorial like other other tutorials but i'm having no luck getting it to work on my dsm218+.
I have no technical knowledge on hardware/software, but i usually find my way around to get things to work

I'm trying to install NextCloud on dsm since me and my father don't actually like the user interface in dsm, also quickconnect is really slow and the apps are annoying.

I wanted to try nextcloud but i can't get it to work either via stack in portainer, or via docker compose as I tried yesterday i get the same message log as i'm receiving following your tutorial for phpmyadmin
both the nextcloud container from yesterday and my phpmyadmin container following your guide, don't start and log this message
[Sun Jun 26 09:26:39.045137 2022] [:crit] [pid 1] (38)Function not implemented: AH00141: Could not initialize random number generator

As i read yesterday, they say it's a kernel problem and their solution was to clone the nextcloud image from dockerhub and edit the apache config file to use php apache buster instead of bullseye, but i dont have the knowledge to change that and deploy the modded instance

As for your tutorial, i don't actually know how to get it to work.
Any help? thanks
 
i followed this tutorial
I'm running it on a DSM 6.2.4-25556 Update 6
and sorry for error in mentioning, my dsm model is DS216+II, not the 218 as i said before
i'm beginner level familiar with docker and deploying pre-made stacks, i got many services to run on my omv server, and some also on the dsm itself (installed portainer, agentDVR, Syncthing and something else i did as a test) so, i guess it's not all my fault of not understanding.

I created all the folders etc but my error code is the same as the one i receive from this tutorial about phpmyadmin, about error AH00141 could not initialize random number generator.

I don't actually know what info to give you about kernel or any other software version in dsm, i just installed everything as the latest version i could find.
Docker was installled from the software center, while the docker containers both via docker compose and via portainer

One thing i'm not able to do is to run a docker container from a cloned repository as mentioned in the above link

Right now as a solution to this method i'm trying to manually pull from the docker hub the php apache buster and from there following this tutorial and see what happens
 
So i got it to work using the image `php 8.0.21RC1-apache-buster` i pulled manually, if i visit it i receive:

Forbidden​


You don't have permission to access this resource.



Apache/2.4.38 (Debian) Server at 192.168.1.50 Port 3333
 
The problem here is the old kernel version that syno uses. That is causing problems with the pho prerequisites. So you will have to use the Dockefile for the nextcloud and build an image yourself in order to create the one with php that will work with the current syno kernel.

Ofc long term this is something that needs to be updated from Syno side but until that happens you will have to build your own images, or run nextcloud on an alternative docker platform (or bare metal)
 
Well, yes, I got that part
My question is about whether there's an alternative to this method (I don't know how to build my own image) and why other people seem to be successful with doing this way without that problem since i read that syno isn't really up to speed about kernel releases, so how can some people do this while others have this issue for the last 4 years.

Also, about the last part I mentioned I got to download php buster and it seems to not have that error (logs are fine)
But I have the problem I can't access it via port 3333 since it is throwing me an "unauthorized" error
Also , downloading it manually as I did, is something viable to link to a nextcloud image or do i still have to build the image myself?
 
how can some people do this while others have this issue for the last 4 years
Well, it's because some people really want to run the NC image on their NAS images and are fine with tweaks.

Also , downloading it manually as I did, is something viable to link to a nextcloud image or do i still have to build the image myself?
Not sure what you did exactly, but if the image is not built properly it could lead to permission problems. IMHO it would be best to build your own image and take it from there.

If you have never done a docker image let me try and help out.

1st you will need to SSH into your NAS as root user. Login into your NAS as your default user and then elevate to root with this command: sudo -i, and reenter your default pass.

Now that you are root you are good to go.

Once you do that, download this file and save it in a folder on your NAS of your choice. Save it as Dockerfile with no extensions (so just like the one you have downloaded).

Open the file in a text editor of your choice (like Visual Code or something), and following the suggestions in the issue topic on Github, replace line No2:

original: FROM php:8.0-apache-bullseye
replace: FROM php:8.0-apache-buster

After you have done that, save the file, and double-check that it is still a Dockerfile file with no extension!

Next, go back to your SSH root login, and move to the folder on your NAS where the previous Dockerfile has been saved.

From that folder patch execute the following command to build your image:

docker build ./ --tag mynextcloud:latest --no-cache

Ofc, you can change the name to fit your needs. Once you run this, Docker will start pulling all that it needs to configure and build the image. Sit tight and wait for it complete. Once done, you will have it listed in your Docker images on your NAS so you can start it by using docker-compose that the official documentation states, just change the name of the nextcloud image with the one that you have given your image.

That should be it.
 
Well, it's because some people really want to run the NC image on their NAS images and are fine with tweaks.


Not sure what you did exactly, but if the image is not built properly it could lead to permission problems. IMHO it would be best to build your own image and take it from there.

If you have never done a docker image let me try and help out.

1st you will need to SSH into your NAS as root user. Login into your NAS as your default user and then elevate to root with this command: sudo -i, and reenter your default pass.

Now that you are root you are good to go.

Once you do that, download this file and save it in a folder on your NAS of your choice. Save it as Dockerfile with no extensions (so just like the one you have downloaded).

Open the file in a text editor of your choice (like Visual Code or something), and following the suggestions in the issue topic on Github, replace line No2:

original: FROM php:8.0-apache-bullseye
replace: FROM php:8.0-apache-buster

After you have done that, save the file, and double-check that it is still a Dockerfile file with no extension!

Next, go back to your SSH root login, and move to the folder on your NAS where the previous Dockerfile has been saved.

From that folder patch execute the following command to build your image:

docker build ./ --tag mynextcloud:latest --no-cache

Ofc, you can change the name to fit your needs. Once you run this, Docker will start pulling all that it needs to configure and build the image. Sit tight and wait for it complete. Once done, you will have it listed in your Docker images on your NAS so you can start it by using docker-compose that the official documentation states, just change the name of the nextcloud image with the one that you have given your image.

That should be it.
Sorry for not responding yesterday, but i got exhausted from this issues, some issues i'm facing with agentDVR and other pc stuff, i had a meltdown

I followed instructions, they were the same I had already done, but I think I messed somethign up because they didn't work the other day, whil yesterday had some progress....but briefly.

Now i don't get the same error, the container seem to be starting but then crashes with this error

Can't start Nextcloud because the version of the data (24.0.2.1) is higher than the docker image version (22.2.9.1) and downgrading is not supported. Are you sure you have pulled the newest image version?

Searching on internet I've found that the culprit might be the php image..but I don't know and don't understand where to figure this thing out
-- post merged: --

It was the first one I tried, but unsuccessfully

As I mentioned, the standard image gives me the error :
AH00141 could not initialize random number generator.

The thing I don't understand is why some users get this error, while others don't....
I get some people are able to figure out by themselves, but I don't think that peolpe that post those tutorials, helping people by hand in the process, actually leave them dealing with this by themselves...
 
Now i don't get the same error, the container seem to be starting but then crashes with this error
1st off have you managed to build a "custom" image with the changes needed?

Due to this error, have you maybe connected to the same DB that was already deployed or have you started completely fresh when you got this error?
 
I believe I followed your directions as i could
Following the github's guide I had the repository downloaded locally and had already did the modification to the file and the Following the github's guide I had the repository downloaded locally and had already did the modification to the file and the
Code:
docker build ...
command.

I did that again with your command then used the docker compose with the "mynextcloud" name as you mentioned
-- post merged: --

the repository that github made me download had a "latest.txt" file that inside has just the line "24.0.2"
-- post merged: --

oh no I found the culprit... the Dockerfile mentions the version 22 in line 125
 
1st off have you managed to build a "custom" image with the changes needed?

Due to this error, have you maybe connected to the same DB that was already deployed or have you started completely fresh when you got this error?

At this moment I don't actually know where i'm at
I don't actually remember what I did yesterday, I tried to recreate it but could'n even get to the deployment of the container that says
Can't start Nextcloud because the version of the data (24.0.2.1) is higher than the docker image version (22.2.9.1) and downgrading is not supported. Are you sure you have pulled the newest image version?

I tried to run the
Code:
 docker build ./ --tag mynextcloud:latest --no-cache
again but I don't know If it is successful or not, the only thing I could decrypt from it was the last line that says
Code:
returned a non-zero code: 137
and after searching I see it is an out of RAM memory code, so I don't know if it is true or not (i don't remember how much ram the dsm has)

Now I'm trying to run the command on my pc to see the output but I wouldn't know how to use the built image from my pc to the nas... or what other options I have

My pc finished the command with
Code:
[....]
Step 14/14 : CMD ["apache2-foreground"]
 ---> Running in 9cd3819765cf
Removing intermediate container 9cd3819765cf
 ---> 094c0b5f2870
Successfully built 094c0b5f2870
Successfully tagged mynextcloud:latest
 
My pc finished the command with
Excellent

Ok now export the image from your pc docker setup and import it into your NAS.

So now 1st use the command line to export the image on your PC:

Code:
docker save mynewimage > /tmp/mynewimage.tar

The path (/temp) can be any location that you want on your pc and the name of the .tar file can also be of your own choice.

Once the export is complete, copy the file to your nas to a folder of your choice.

Then log into your NAS via SSH as root, and move into the folder where the image is located. Once there, execute this:

Code:
docker load < /tmp/mynewimage.tar

This will import the image into your NAS Docker and you will be able to use it.
 
Last edited:
Excellent

Ok now export the image from your pc docker setup and import it into your NAS.

So now 1st use the command line to export the image on your PC:

Code:
docker save mynewimage > /tmp/mynewimage.tar

The path (/temp) can be any location that you want on your pc and the name of the .tar file can also be of your own choice.

Once the export is complete, copy the file to your nas to a folder of your choice.

Then log into your NAS via SSH as root, and move into the folder where the image is located. Once there, execute this:

Code:
docker load < /tmp/mynewimage.tar

This will import the image into your NAS Docker and you will be able to use it.

So, I managed to do all this by googling around and did the same things you mentioned

my docker load is stuck on for at least 15 minutes,

Code:
Initializing nextcloud 24.0.2.1 ...
New nextcloud instance
Initializing finished
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
[Tue Jun 28 13:19:36.833346 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/8.0.20 configured -- resuming normal operations
[Tue Jun 28 13:19:36.833470 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

nope, doesnt' work with log code

Code:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
 [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/8.0.20 configured -- resuming normal operations
[core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
 
Hmm there are no actual errors here, as Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message is a very common warning that can be fixed but its a go/no go showstopper.

So if you container running at all or does it stop and crashes after a while? Have you tried to access it over a browser?
 
Hmm there are no actual errors here, as Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message is a very common warning that can be fixed but its a go/no go showstopper.

So if you container running at all or does it stop and crashes after a while? Have you tried to access it over a browser?
No, it doesn't run at all.
I'm trying to install it and launch nextcloud from a raspberry with ubuntu server and get more familiar with it and see if I can figure out and learn something to troubleshoot the installation on a synology.

I researched all those problems but none of them point me in a specific direction or error...
-- post merged: --

Plus, now synology is giving me a headache with AgentDVR that i deployed and worked fine, until something during a setup messed the configuration for camera2 and brought in repeated crashes, but I can't address it since agentDVR is giving me errors of being unable to be accessed via browser due to firewall ports not opened, but i checked them all and haven't got any firewall turned on.

It worked fine for 2 days, then, without any update or change, now i can't access it.

Everything is driving me insane...
 
Hmm there are no actual errors here, as Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message is a very common warning that can be fixed but its a go/no go showstopper.

So if you container running at all or does it stop and crashes after a while? Have you tried to access it over a browser?
update:
I changed nothing, re run the image i previously built and now it worked....
thanks a lot for the help and patience ;)
;)
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

For anyone interested in setting up TTRSS with the official Docker container I've writte a new tutorial...
Replies
18
Views
18,556
Thanks for the idea of trying to fire this up. Any idea what I'm doing wrong? I've managed to launch...
Replies
3
Views
7,655

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top