Setup MySQL, PHPMyAdmin and Nextcloud In Docker

  • Hi


    I'm new to the forums and I've recently bought a Rock64 from Pine64 and have successfully installed OMV onto a 64GB Micro SD Card.


    To cut a long story short I want to install a MySQL DB with PHPMyAdmin as the front-end GUI and then setup Nextcloud.


    So far I have installed the latest following Docker images:-
    MySQL - https://hub.docker.com/r/mysql/mysql-server
    PHPMyAdmin - https://hub.docker.com/r/phpmyadmin/phpmyadmin



    These are the ports I would like to utilise:-
    OMV - 80 (default)
    PHPMyAdmin - 8080
    Nextcloud - 8888


    Ideally I would like to setup this up in the OMV GUI as much as possible, however if commands are required I happy to use them via SSH. I have a website and I'm a YouTube content creator so If I can set this up well I will be making a guide and sharing for others to follow.


    Many thanks


    Will

    • Offizieller Beitrag

    This video will help with nextcloud and mysql - Installation and Setup Videos - Beginning, Intermediate and Advanced


    There are lots of videos on that thread that should let you figure out what you need for phpmyadmin.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thanks for the reply.


    I had a look through his videos on YouTube before posting on here and did watch the Nextcloud video.


    Externer Inhalt youtu.be
    Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklären Sie sich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.


    However, he uses MariaDB whereas I would like to use PHPMyAdmin as a front-end for MySQL.


    I also watched this video but I'm having difficulty setting up NGINX with PHPMyAdmin. This video covers OMV 3 on a Raspberry Pi 3 so none of the commands from 13 minutes in apply to my Rock64 running OMV 4.

    Externer Inhalt youtu.be
    Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklären Sie sich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.


    Many thanks


    Will

  • As you already mentioned phpMyAdmin is just a frontend. You either need MySQL or MariaDB as database management system.

    The problem I'm having is setting them all up so they communicate with one another. Through Docker I can install Nextcloud, MySQL and PHPMyAdmin. When you click on the 'run' button it's the settings on this popup window I need to configure.

    • Offizieller Beitrag

    he uses MariaDB whereas I would like to use PHPMyAdmin as a front-end for MySQL.

    You do realize that mariadb is mysql, right? mariadb is what you get when you install the "mysql" package on Debian 9/OMV 4.x.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Either you just run both, mariadb and phpAdmin and connect via exposed ports or, if you only want phpAdmin to connect to mariadb and nothing else, you create a docker net and add both to it. Docker Compose has some nicely structured yaml files with the flag links. This does the very same, creating a docker net and add all linked containers in it.

  • I've found this guide which fits the bill
    https://tecadmin.net/tutorial/…ocker-networking-example/


    Here are the commands I have been running from SSH


    However, when running PHPMyAdmin its status is showing Exited (1) using lines 20 or 22. Any reason why PHPMyAdmin is failing to run?

  • Hm, cant really see what is wrong with the command and I dont remember tag order being important here, but you may try - it directly infront of the image name.
    Also try sh and zsh instead of bash, maybe they thinned the image.

  • Might also be a bad reference in the bashrc inside the container. Lots of possibilities.
    If I find time, I will pull the image and have a look, but right now I dont have access to my pc, traveling by train.

  • Just checked, they stripped the image down and there is no bash installed inside, but sh of course is.


    docker run -it --rm -p 8080:80 --network Nextcloud-bridge phpmyadmin/phpmyadmin /bin/sh


    You can than check everything inside. In the root folder there is a script run.sh, which kind of looks like the entrypoint script, but they propably used CMD too, looking at run.sh. Feel free to check at dockerhub, how this image is build.
    Running the container like this:
    docker run --name test --rm -p 8080:80 phpmyadmin/phpmyadmin
    which is basically the same you do, despite not connecting it to a docker net,works just as it is supposed and I can open phpAdmin at localhost:8080


    You should now track this down. If my last command wont run, you got some other issues. Maybe you use an arm platform and try to run this image? If this command works, you need to go back checking what exactly fails, start by not using -d and look at the prompts or by manually starting it step by step out from sh.

  • Thank you very much for your reply.


    To cut a long story short PHPMyAdmin doesn't run through docker on my ARM64 chip. However, using


    Code
    apt-get install mysql-server
    apt-get install phpmyadmin
    apt-get install nginx

    I have successfully setup PHPMyAdmin to gain access to my MySQL DB using NGINX as a web server. However, I now entirely unsure how to connect Docker's Nextcloud image to the other three.


    I have been watching this video

    Externer Inhalt www.youtube.com
    Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklären Sie sich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.


    However, as I would like to make a guide on all of this I'm trying to setup through the Docker GUI in OMV.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!