+1 323 268 0395 kmw@caltek.net

docker mailing list archives

Zainab Abdullah 2:57 PM (8 hou [...]

by
CalTek.Net, Kenneth Wyrick
- 10/24/2020 06:36:10

Zainab Abdullah
2:57 PM (8 hours ago)
to Sruti, Vct, Josh, me

Hello Sruti,

My Docker host is fedora 31 and I am running the latest image of Portainer-ce. Here is the link: https://hub.docker.com/r/portainer/portainer-ce. 

Docker and Portainer Container are hosted in the same machine.

The problem is that when I first ran the container and attached it to the volume I created on the host, the server was running but it couldn't connect to the local docker even when I used the old image which is https://hub.docker.com/r/portainer/portainer

So, what I did is running the container with flag --privileged and then I was able to get Portainer to connect to my docker and it is showing now all the containers and network I have on my machine.

I can write a documentation on how to install and run Portainer server container if that is what we are looking for.

This is as I mentioned on my machine because I didn't want to run any test on the Texas server when I was given access this week as Portainer is new for me and I didn't want to do something that could cause issues to the instances running on the production server. Is it the same issue you faced? would it be possible to explain the issue you fixed to check my settings?

For Moodle,

First I tried running this on my machine to see how things would go since there is no documentation: https://hub.docker.com/r/turnkeylinux/moodle/tags 

The container would stop immediately.

So, I searched on Docker hub and found this one: https://hub.docker.com/r/bitnami/moodle

Here is what I did:
I tried to run it first on my fedora and it failed to run moodle container with permission issue on /proc/self/fd/1 when I looked at the container logs. Is that something you ran into before?
I tried to upload the compose yml file via Portainer GUI and it failed. So, I thought I would give it a try in the terminal with docker-compose up command and it stuck in upgrading the database. I used these images (bitnami/mariadb & bitnami/moodle). Here is the link: https://hub.docker.com/r/bitnami/moodle/tags
Ran docker compose with different tags for the images. Last try was on Ubuntu and found someone who ran into the same issue and it worked in his situation when he changed docker compose version from 2 to 3. So, I gave it a try on ubuntu machine that has no portainer server and I had another error.

This is the part of the logs from Ubuntu with the latest images for mariadb and moodle: 

db         | 2020-10-23  5:04:08 0 [Note] Reading of all Master_info entries succeeded
db         | 2020-10-23  5:04:08 0 [Note] Added new Master_info '' to hash table
db         | 2020-10-23  5:04:08 0 [Note] mysqld: ready for connections.
db         | Version: '10.5.6-MariaDB-1:10.5.6+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
moodle     | moodle 05:04:13.24 INFO  ==> Running Moodle install script

---------------------------------------------------------------------------------------------------------------------------------------------------------------

This is the part of the logs from ubuntu machine when running the latest image of mariadb and moodle image with tag: 3.7.1

moodle     | mysql-c INFO  Trying to connect to MySQL server
db         | 2020-10-23  5:56:28 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '172.20.0.3' (This connection closed normally without authentication)
moodle     | mysql-c INFO  Found MySQL server listening at db:3306
moodle     | mysql-c INFO  MySQL server listening and working at db:3306
moodle     | moodle  INFO  Running Moodle install. Please be patient...
moodle     | Error executing 'postInstallation': Database tables already present; CLI installation cannot continue.
moodle     |
moodle     |
moodle exited with code 1


I tried to delete the volumes and recreate them but I am still having the same error (database tables already present)

If these issues are similar to what you faced, please let me know!

Here is a copy of the compose file:

version: '3'
services:
  mariadb:
    image: 'mariadb:latest'
    container_name: db
    environment:
      MYSQL_RANDOM_ROOT_PASSWORD: 1
      MYSQL_DATABASE: moodle
      MYSQL_USER: moodle
      MYSQL_PASSWORD: moodlePassword
    volumes:
      - $HOME/volumes/mysql:/var/lib/mysql

  moodle:
    image: 'bitnami/moodle:3.7.1'
    container_name: moodle
    environment:
      MOODLE_USERNAME: test
      MOODLE_PASSWORD: test
      MOODLE_EMAIL: test@example.com
      MARIADB_HOST: db
      MARIADB_PORT_NUMBER: 3306
      MOODLE_DATABASE_USER: moodle
      MOODLE_DATABASE_NAME: moodle
      MOODLE_DATABASE_PASSWORD: moodlePassword
      ALLOW_EMPTY_PASSWORD: "no"
    ports:
      - '80:80'
      - '443:443'
    volumes:
      - $HOME/volumes/moodle:/bitnami'
    depends_on:
      - mariadb

volumes:
  mariadb_data:
    driver: local
  moodle_data:
    driver: local


I have cc'd Josh as he suggested me to send a pull request with the compose file of the deployment. I would add the file to my github and send pull request later. 

Thanks all.