docker-library / drupal Goto Github PK
View Code? Open in Web Editor NEWDocker Official Image packaging for Drupal
Docker Official Image packaging for Drupal
Drupal 8 throws this warning:
The PHP EXIF extension is not installed. Automatic image orientation effects will not be available with the GD image toolkit.
Apache with PHP FPM is much better than mod_php. How about to provide alternative?
what's the difference between 8.5-fpm image and 8.5-apache? If there are only the php-fpm configurations for drupal8 in 8.5-fpm image?
The current drupal container doc describes the use of the deprecated docker link facility to 'link' a drupal container to a local db container.
First, this is bad - you need stop using link.
Second, using the drupal container with an external DB seems like a pretty common case - much more common than running the db as a local container. Why is there no doc for this case?
I need to connect a drupal container to an RDS DB instance. I'm hoping that by creating a settings.php with the correct config and building a new drupal container with this settings.php in /var/www/html/ this will config drupal to use my RDS DB.
How do I verify if this is working? Is there some other solution to this issue?
Sorry for posting an issue here just wanted to know what are the differences between the apache
image and the fpm
.
Hi All
May I know how to setup a Drupal High Availability with Docker
Thanks
Is there a way support can be added for Docker secrets (using "xxx_FILE" env to read pw in from a Docker secrets file)? Apparently, WordPress provides this support (using "WORDPRESS_DB_PASSWORD_FILE") as mentioned in this Docker article:
https://docs.docker.com/engine/swarm/secrets/#advanced-example-use-secrets-with-a-wordpress-service
This is the specific commit of how 'mysql' added Docker secret support:
Thanks!
It would be nice to match existing UID's and GID's on shared volumes. This should be a trivial addition.
As mentioned in 41970d6 many Drupal contrib modules and custom code will not work in PHP 7.
Drupal 7 actually supports PHP 5.3 - 5.7 as well as 7.0.
It would be nice to get an official tag for Drupal on php5, especially since we have working Dockerfile at https://github.com/docker-library/drupal/blob/bee08efba505b740a14d68254d6e51af7ab2f3ea/7/Dockerfile
Adding onbuild would bring the official Drupal image in line with other official Docker projects such as Rails, iojs, etc.
See https://github.com/nhoag/docker-drupal for a working example.
Hi I have a quick question about how the automated Travis tests work. My pull request failed to pass and I'm trying to understand why so I can fix it: #63
It seems that the override-cmd test is failing in my branch. The entrypoint script in my branch outputs some status messages using echo. Is that what's causing the override-cmd test to fail? Does that test expect to ONLY see the "hello world" output that it generates, and nothing else?
https://github.com/docker-library/official-images/blob/master/test/tests/override-cmd/run.sh
Any insight or advice you can provide would be welcome! Thanks!
Can we create an entrypoint.sh file with the environment variables to automate profile, language and db configurations for drupal installation?
Hey I think there are somthing wrong on this file. The Nginx service is missing and I didnt see the php7.0-fpm on this images when I built on my self.
Please take a look on this file :)
Add support for drupal 8.3.1.
I've come accross this error when accessing the drupal 8.0.1 container front page as anonymous visitor:
Uncaught PHP Exception Exception: "DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone." at /var/www/html/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber [...]
Looking to the php image page, adding a php.ini in the dockerfile seems to be recommended. I don't know if this should be in this dockerfile or just documented on the page, since the appropriate timezone might be different for every user...
Drupal would require some local storage for images and the like, right? So in order for the container to be persistent wouldn't I need to include a volume as well as the database?
If it is needed, I'm confused as to why the official Wordpress Dockerfile specifies a volume while the official Drupal Dockerfile does not?
I think with a little bit of work, along with the changes I proposed in #63 , we could make it possible for Drupal distribution maintainers to inherit from these images to provide Docker images for their distributions.
Distributions are pre-packaged combinations of Drupal core and other selected modules, themes, etc. Examples include OpenAtrium (https://www.drupal.org/project/openatrium), Commerce Kickstart (https://www.drupal.org/project/commerce_kickstart), and farmOS (https://www.drupal.org/project/farm).
Currently, the Dockerfiles create two environmental variables:
ENV DRUPAL_VERSION 7.50
ENV DRUPAL_MD5 f23905b0248d76f0fc8316692cd64753
These are used to download and verify the packaged drupal codebase:
curl -fSL "http://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz"
echo "${DRUPAL_MD5} /usr/src/drupal-${DRUPAL_VERSION}.tar.gz" | md5sum -c -
Drupal distributions can be downloaded and verified using the same pattern, except instead of "drupal" they use their project name (ie: "farm").
As a first step, we can add an additional environmental variable:
ENV DRUPAL_PROJECT drupal
And use that to build the download URL:
curl -fSL "http://ftp.drupal.org/files/projects/${DRUPAL_PROJECT}-${DRUPAL_VERSION}.tar.gz"
There are a few other things to figure out... the code changes introduced in #63 automatically compare the "current" and "desired" Drupal versions using Drush. But that only looks at the Drupal core version. A distribution will have it's own version on top of the Drupal core version. So we will need to tweak the way that version comparison code works too.
(!docker newbie!)
Yesterday I ran docker-compose using https://hub.docker.com/_/wordpress/ which has a way better UX then trying https://hub.docker.com/_/drupal/
WP was a no brainer but Drupal lacks a docker compose file so I got stuck. I could have used __ SQLite__
AFAIK we need environment variables first to link the two containers together?
Is it worth the effort to create this docker-compose.yml file and if so what steps are there to take?
I see that in #28 that the Dockerfile was modified to make extension related directories (modules, themes, and profiles) web server writable. I can see why this was done -- it makes it possible to install themes and modules via the admin UI -- but it's arguably a security hole, since it greatly increases the surface for attacks that work by adding malicious executable code to an install.
While I'd guess that small drupal installs that use the admin UI install feature is an important use case here, we may want to add a note to README.md indicating that volumes mounted at those points should only be writable if you intend to do this. Otherwise, users of the image would be better off with root.root ownership on these directories.
The same could be said about settings.php as well.
ciao,
i'm one of two maintainers of that Drupal-image. that image aims to provide an easily extendable vanilla Drupal-experience as well as a base for also easily customized Drupal-images. notably, it features:
UPLOAD
- & MEMORY_LIMIT
entrypoint.sh
that provides hooks for an inital setup (default if no db is detected) and pre-launchdrush
-usage in scripts and bashif you think that any of these features fits to this image, we offer to upstream it. feel free to review the repository in question. depending on your response we'd prepare commits then.
by that opportunity, are there plans to publish guidelines what functionality an image from this library sould or must not provide?
Currently image use php:5.5-apache.
Drupal 7 have no problem with php:5.6, so why not use it?
Can any one help in defining with network scope along with MySQL linking with Azure storage.
I already with volume plugin and I'm able create volumes using volume plugins.
Are you open to include Drush into this image? If yes, I will prepare PR, if not I will do it in my derivated image.
How to use together nginx
and drupal:8-fpm
container?
In my practice nginx
and php-fpm
containers should have common volume with servable script (drupal).
As I understand, drupal:8-fpm
image has drupal
sources inside container (added on build stage).
Is it possible to serve drupal:8-fpm
through nginx
container?
There should be a VOLUME entry in the Dockerfile at /var/www/html so that you can install modules and persist data. Otherwise I'd have to re-build a custom container image to achieve what should be a default. Please take a look at what Wordpress and Joomla are doing with their Dockerfiles.
Just adding some awesome alpine support. ^_^
I didn't touch the apache conf given:
I also updated the update.sh
script but wasn't sure if any changes needed to the generate-stackbrew-library.sh
file.
P.R: #72
Drupal 8 throws this warning:
The GD Library for PHP is enabled, but was compiled without FreeType support. Image effects using fonts will not be available with the GD image toolkit.
When I try to install a module a get an error that I don't have permissions for writing in the module folder.
Can you guys add change permission to the dockerfile?
There's currently critical vulnerabilities detected in most images -->
Should we include Drush in the image?
All Drupal 6, 7, 8 installs are vulnerable and need updating immediately https://www.drupal.org/sa-core-2018-002
Is there a plan in place for speeding up updates for highly critical security releases? I'm concerned at how long sites running Drupal on the official Docker image have been vulnerable for.
Both D7 and D8 ship with Contact Module, which generates a web form and send the inquiry to Emails. With this image, this function doesn't work, because there is no email server included in the image.
So, I am wondering if we want to support this Core function in this image?
Hello, this is how I started my drupal instance
docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=drupal -d mysql
docker run --name some-drupal --link some-mysql:mysql -p 8080:80 -d drupal
I visit my ip:8080 and start the installation and none of my mysql creds are linked.
Shouldn't I not need to go through the db setting if I have a mySql linked?
I wanted to mount /var/www/html/ to a host folder but when I do so. Drupal seems to not install at all,
Is there some work around this problem?
Can I run this docker image in my Docker version 1.11.2, build b9f10c9 ?
Drupal 8.0.4, Drupal 7.43, and Drupal 6.38, maintenance releases which contain fixes for security vulnerabilities, have been released on February 24, 2016 at 6:36pm.
This official image repo does not seem to create automated-builds, or if it is, it hasn't picked these releases yet.
Are there any plans to streamline the image building, so that we can deploy updates quicker and fix security vulnerabilities ASAP after their disclosure?
I'm trying to run a Drupal container but I keep getting this error. https://gyazo.com/a7c50a1d8cf9502a3f667063352a425e
I used the following command to create a container with the necessary volume mounts:
docker run --name drupal -p 80:80 -v /data/drupal/sites:/var/www/html/sites/default/files -v /data/drupal/themes:/var/www/html/themes -v /data/drupal/profiles:/var/www/html/profiles -v /data/drupal/modules:/var/www/html/modules --link redis:redis --link mariadb:mysql -d drupal
I'm doing something wrong or is this a known issue?
I've noticed that this dockerfile has no a php ldap extension, is any future version bunded with php ldap extension?
Hi there,
I pulled the Drupal 8, installed via sqlite. When I come to install drush and do some things in it, got very stuck because the sqlite3 library wasn't installed. Commands like drush dl and drush status would work, but nothing which touched the database.
Eventually ran drush with debug mode and realised it needed the sqlite3 library.
Might be something to add along with pdo_mysql and pdo_postgresql in the install to smooth the path for users.
Regards,
Cameron
I don't know if some tried but if you want to use a module like monolog or rabbitmq you need to use composer (and is not in!) also because you are root, if you don't have that in mind when you use drush or something it will be create files with root and in your local too
Been trying to get Azure SQL working with version 8 of this image but to no avail. Is there a way to include support for the Drupal driver for Azure SQL (https://www.drupal.org/project/sqlsrv)?
I'm using the current rc-fpm container image. It appears that for some reason php-fpm can't find gd.so in the container even though it is in the container.
When I run the container with the default Cmd (php-fpm) it logs this warning:
[14-Feb-2018 21:55:01] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/gd.so (libpng16.so.16: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20170718/gd.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Usage: php [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p ] [-g ] [-c ] [-d foo[=bar]] [-y ] [-D] [-F [-O]]
In fact, gd.so is exactly where it should be in the container:
core@ip-10-0-6-213 ~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
deb8ab170e4c nginx:alpine "nginx -c /etc/nginx/" 2 days ago Up 2 days lb-cntnr
b629fbab59e7 drupal:rc-fpm "docker-php-entrypoin" 2 days ago Up 2 days drupal-cntr
core@ip-10-0-6-213 ~ $ docker exec b629fbab59e7 ls /usr/local/lib/php/extensions/no-debug-non-zts-20170718/
gd.so
mbstring.so
opcache.a
opcache.so
pdo.so
pdo_mysql.so
pdo_pgsql.so
zip.so
In my docker-compose I have a mysql image and this drupal image. I started it and installed a new theme. However, when I remove the drupal image and create a new one the themes are gone. They're still in the database though, because I don't delete it.
Is there a possibility to create an image with a preloaded theme? What I managed to do was to create the image with preconfigured settings. I set up my Drupal site, then copied the settings.php
to my host and in the Dockerfile
this file is added back again to the container. This skips the installation progress, however, the site doesn't work correctly because of the themes.
And when I copy all the contents of default/files
as well I get at least a bit of a theme, but there are still many css/js missing. So, is there a way to create the image, with a preloaded theme, throw it away, create a new one and still have the theme?
Will these critical updates be pushed to docker hub for 8.3.9 and 8.4.6? https://www.drupal.org/sa-core-2018-002
The 8.3/8.4 docker libraries were EOL'd under the assumption that there would be no more updates, but here we are. Any information you provide would be very helpful. Thank!
Should we include Drupal Console in the image?
I want to konw this file whether or not support arm64.
https://ftp.drupal.org/files/projects/drupal-8.3.5.tar.gz" -o drupal.tar.gz
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.