diff --git a/bitnami/drupal/Dockerfile b/bitnami/drupal/Dockerfile index 8aaca4dcea74..6830901fbb6b 100644 --- a/bitnami/drupal/Dockerfile +++ b/bitnami/drupal/Dockerfile @@ -10,7 +10,7 @@ ENV BITNAMI_APP_NAME=drupal \ #Download latest Drupal Stack from bitnami.com RUN sh $BITNAMI_PREFIX/install.sh \ - --base_user $BITNAMI_APPLICATION_USER --base_password $BITNAMI_APPLICATION_PASSWORD --apache_mpm_mode event --enable_phpfpm 1 --logrotate_install 1 --monit_install 1 && $BITNAMI_PREFIX/ctlscript.sh stop && \ + --base_user $BITNAMI_APPLICATION_USER --base_password $BITNAMI_APPLICATION_PASSWORD --apache_mpm_mode event --enable_phpfpm 1 --logrotate_install 1 --monit_install 1 && \ rm $BITNAMI_PREFIX/install.sh EXPOSE 80 443 22 diff --git a/bitnami/drupal/README.md b/bitnami/drupal/README.md index 0cc593cace4e..9d08adef9a3a 100644 --- a/bitnami/drupal/README.md +++ b/bitnami/drupal/README.md @@ -3,9 +3,113 @@ Docker image for [Bitnami Drupal Stack](https://bitnami.com/stack/drupal) # TLDR ``` -docker run --name=drupal -d -p 80:80 -p 443:443 bitnami/drupal +docker run --name=drupal -p 80:80 -p 443:443 bitnami/drupal ``` +# Get this image + +The recommended way to get the Bitnami Docker Image for Drupal is to pull the prebuilt image from the [Docker Hub Registry](https://hub.docker.com/r/bitnami/drupal). + +```bash +docker pull bitnami/drupal:latest +``` + +To use a specific version, you can pull a versioned tag. You can view the +[list of available versions](https://hub.docker.com/r/bitnami/drupal/tags/) +in the Docker Hub Registry. + +```bash +docker pull bitnami/drupal:[TAG] +``` + +If you wish, you can also build the image yourself. + +```bash +git clone https://github.com/bitnami/bitnami-docker-drupal.git +cd bitnami-docker-drupal +docker build -t bitnami/drupal . +``` + +# Configuration + +## Application credentials + +Running the container in foreground will show some information about to access your application. If you started the +container with the flag `-d` you can retrieve it by running `docker logs drupal`. + +In case you want to change the default user and password you would need to build the image by your own following [this steps](#get-this-image) +and modifying the line `BITNAMI_APPLICATION_PASSWORD=bitnami` in the Dockerfile before starting the build. + +## Application files + +If you want to make the application files accessible for modifying them you could use a volume to share these files with the host. This can be done by adding some extra options to the `docker run` command: + +``` +docker run --name=drupal -v ~/drupal-files:/opt/bitnami/apps -e USER_UID=`id -u` -p 80:80 -p 443:443 bitnami/drupal +``` +This will create a folder `drupal-files` in your home directory exposing the folder /opt/bitnami/apps in the container. This folder should be empty or non existent when creating the container. + +NOTE: Currently is only possible to expose `/opt/bitnami/apps`. Also setting the variable USER_UID will make the files modifiable by your current user. + +# Logging + +The Bitnami Docker Image for Drupal will write to stdout the information about the initialization process so it is accesible by running the command `docker logs drupal`. + +In order to check the logs from services as the HTTP server or databases you could use the following commands: + +``` +docker exec -it drupal /opt/bitnami/scripts/logs.sh apache +docker exec -it drupal /opt/bitnami/scripts/logs.sh mysql +``` + +# Maintenance + +## Backing up your container + +In order to backup your containers you could pack the /opt/bitnami directory and copy it to the host by running the following commands: + +``` +docker exec -it drupal /opt/bitnami/ctlscript.sh stop +docker exec -it drupal tar -pczvf /tmp/drupal-backup.tar.gz /opt/bitnami +docker exec -it drupal /opt/bitnami/ctlscript.sh start +docker cp drupal:/tmp/drupal-backup.tar.gz /path/to/destination/directory +``` +NOTE: this commands assume that your container is named `drupal`. + + +## Upgrade this image + +This image is intended for development/testing purposes. For this reason, upgrading the individual components is not supported yet. + +# Testing + +This image is tested for expected runtime behavior, using the +[Bats](https://github.com/sstephenson/bats) testing framework. You can run the tests on your machine +using the `bats` command. + +``` +bats test.sh +``` + +# Contributing + +We'd love for you to contribute to this container. You can request new features by creating an +[issue](https://github.com/bitnami/bitnami-docker-drupal/issues), or submit a +[pull request](https://github.com/bitnami/bitnami-docker-drupal/pulls) with your contribution. + +# Issues + +If you encountered a problem running this container, you can file an +[issue](https://github.com/bitnami/bitnami-docker-drupal/issues). For us to provide better support, +be sure to include the following information in your issue: + +- Host OS and version +- Docker version (`docker version`) +- Output of `docker info` +- Version of this container (`echo $BITNAMI_APP_VERSION` inside the container) +- The command you used to run the container, and any relevant output you saw (masking any sensitive +information) + # License Copyright 2015 Bitnami