technicalguru / docker-mailserver-roundcube

Docker image for RoundCube in mailserver projects
Other
5 stars 1 forks source link

Error building Dockerfile #1

Closed j1cs closed 2 years ago

j1cs commented 3 years ago

Hi!

I'm trying to build this project but shows me the following error:

Sending build context to Docker daemon  5.591MB
Step 1/31 : FROM eu.gcr.io/long-grin-186810/rs-php:7.4.4-apache-2.4.38.0
unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication

do I need to configure gcloud auth for build the image?

Thanks for advanced

technicalguru commented 3 years ago

Are you modifying the package? If not you can use the free docker image from docker-hub. Otherwise, use one of the official PHP images. The base image is in a private repo which I cannot make public. :(

j1cs commented 3 years ago

Ok I see. What image do you recommend? I ask because the name of the image says: rs-php:7.4.4-apache-2.4.38.0. do i need something with php and apache? or just php?

technicalguru commented 3 years ago

Try with php:7.4.21-fpm-buster

This shall work (but I did not test it)

j1cs commented 3 years ago

Ok. Will try and I'll let you know.

j1cs commented 3 years ago

I used 7.4.21-fpm-buster which i found on internet. The built worked. However the webserver doesn't start.I think it's because the image doesn't have apache on it. What else you do recommend me?

technicalguru commented 3 years ago

Hey,

just did a research. the -fpm-buster seems the wrong image flavour as it does not contain any web server. The php:7.4-apache seems to be the right one that includes apache.

Let me know whether this starts up.

j1cs commented 3 years ago

The container lifted correctly. The problem now is that the contender lacks many libraries:

Checking PHP version
Version:  OK(PHP 7.4.21 detected)
Checking PHP extensions
The following modules/extensions are required to run Roundcube:

PCRE:  OK
DOM:  OK
Session:  OK
XML:  OK
JSON:  OK
PDO:  OK
Multibyte:  OK
OpenSSL:  OK
Filter:  OK
Ctype:  OK
The next couple of extensions are optional and recommended to get the best performance:

FileInfo:  OK
Libiconv:  OK
Intl:  NOT AVAILABLE(See http://www.php.net/manual/en/book.intl.php)
Exif:  NOT AVAILABLE(See http://www.php.net/manual/en/book.exif.php)
LDAP:  NOT AVAILABLE(See http://www.php.net/manual/en/book.ldap.php)
GD:  NOT AVAILABLE(See http://www.php.net/manual/en/book.image.php)
Imagick:  NOT AVAILABLE(See http://www.php.net/manual/en/book.imagick.php)
Zip:  NOT AVAILABLE(See http://www.php.net/manual/en/book.zip.php)
Checking available databases
Check which of the supported extensions are installed. At least one of them is required.

MySQL:  NOT AVAILABLE(See http://www.php.net/manual/en/ref.pdo-mysql.php)
PostgreSQL:  NOT AVAILABLE(See http://www.php.net/manual/en/ref.pdo-pgsql.php)
SQLite:  OK
SQLite (v2):  NOT AVAILABLE(See http://www.php.net/manual/en/ref.pdo-sqlite.php)
SQL Server (SQLSRV):  NOT AVAILABLE(See http://www.php.net/manual/en/ref.pdo-sqlsrv.php)
SQL Server (DBLIB):  NOT AVAILABLE(See http://www.php.net/manual/en/ref.pdo-dblib.php)
Oracle:  NOT AVAILABLE(See http://www.php.net/manual/en/book.oci8.php)
Check for required 3rd party libs
This also checks if the include path is set correctly.

PEAR:  OK
Auth_SASL:  OK
Net_SMTP:  OK
Net_IDNA2:  OK
Mail_mime:  OK
Net_LDAP3:  OK
Checking php.ini/.htaccess settings
The following settings are required to run Roundcube:

file_uploads:  OK
session.auto_start:  OK
mbstring.func_overload:  OK
suhosin.session.encrypt:  OK
The following settings are optional and recommended:

allow_url_fopen:  OK
date.timezone:  NOT OK(not set)

What do you recommend me? add them in the Dockerfile or search another image that has the necessary libraries?

technicalguru commented 3 years ago

The situation seems not that bad. Most of the missing libraries are optional. You only need to activate the pdo-mysql extension. A simple

RUN docker-php-ext-install pdo_mysql

shall be sufficient in your Dockerfile. You can add the other libraries the same way. It might be required to install libraries with

RUN apt-get update && apt-get install -y $put-librarynames-here$ --no-install-recommends && rm -rf /var/lib/apt/lists/*

PS: Would you mind to share yr Dockerfile once u finished so I can add it here in the repo as an alternative for users?

j1cs commented 3 years ago

Yes, I did some research and came up with what you just told me. You could check my forks. I forked your repos and I'm configuring the services for my home system.

technicalguru commented 3 years ago

I really would like to share the Dockerfile for my PHP base image (and associated scripts). But I am afraid that PHP license does not allow such a free copy. However, I will invest some time to research, perhaps it is allowed and the base image can be made public.

j1cs commented 3 years ago

Ahh didn't know that. But I think with the changes I made you could offer an alternative for your project. However I don't if I infringing some license

technicalguru commented 3 years ago

Regarding PHP: Looks good. I will make the repo free (need to check some security-related issues) and publish it at docker-hub instead of my private repo.

technicalguru commented 3 years ago

docker-php is available now for public. No public image yet though :)

j1cs commented 3 years ago

great!

technicalguru commented 3 years ago

Change e939922 introduces the new image.

technicalguru commented 2 years ago

Closed as this was solved with public base image