This project provides customized Docker images to use with Docker Development Environment. They are in general based on the official Docker images, preferably their debian variant with the addition of some development tools as vi with syntax highlighting and others to be used to check things inside the containers (see the respective Docker files for more information).
Also, there is a script added to change the user ID and group ID of the default user, so when running the containers in your dev environment you can change the user ID and group ID to your private one, so your working directory will not get polluted by files belonging to other users.
The project contains two scripts, one for building the different containers and one for pushing them to docker hub.
To locally build one or all containers of a specific variety use
$ bin/build.sh <container>
where the container is one of the container names written down below. This builds and tags all variants of the container type except for php, where you have to use
$ bin/build.sh php <type> <version>
which will build the fpm or cli type of the latest minor version of version, eg.:
$ bin/build.sh php cli 8.2
will (at the time of writing) build and tag a php cli container with v8.2.3.
This command is used to push the locally tagged version to docker hub. Use:
$ bin/build.sh <container>
Beware: this pushes to the sandstein repositories, which you probably do not have access for. so if you want to use your own repository you should change the file here.
To automatize the push of the latest versions there is a Gitlab-CI configuration which regularly builds the docker containers and pushes them to dockerhub. For now sandstein's own gitlab instance is used to do so, we might change this to some GitHub Actions in the future.
The containers prepared here are the following (in alphabetical order):
An apache webserver container. Only version 2.4 is built. Use
ARG USER_ID=33
ARG GROUP_ID=33
RUN modify-user-ids www-data ${USER_ID} ${GROUP_ID}
in your Dockerfile to run it as your current user.
Versions 5.6, 6.4, 6.8, 7.1, 7.3, 7.6, 7.10, 7.16, 7.17 and 8.6 are prepared. Use
ARG USER_ID=1000
ARG GROUP_ID=1000
RUN modify-user-ids elasticsearch ${USER_ID} ${GROUP_ID} \
&& modify-elasticsearch-entrypoint
RUN bin/elasticsearch-plugin install analysis-phonetic \
&& bin/elasticsearch-plugin install analysis-icu
in your Dockerfile to run it as your current user and to install additional plugins.
Versions 10.2 to 10.7 are prepared. Use
ARG USER_ID=999
ARG GROUP_ID=999
RUN modify-ids mysql ${USER_ID} ${GROUP_ID}
for user customisation.
Versions 5.6, 5.7 and 8.0 are prepared. Use
ARG USER_ID=999
ARG GROUP_ID=999
RUN modify-ids mysql ${USER_ID} ${GROUP_ID}
for user customisation.
NodeJS container for versions 11, 12, 14, 16 and 18 are provided. They include the node-build-tools. No user customisation available, since it was not needed.
Versions 5.7 and 8.0 are provided. Use
ARG USER_ID=999
ARG GROUP_ID=999
RUN modify-ids mysql ${USER_ID} ${GROUP_ID}
for user customisation.
A collection of all mayor PHP versions (from 7.3 to 8.2) as fpm and cli. Use
ARG USER_ID=33
ARG GROUP_ID=33
RUN modify-user-ids www-data ${USER_ID} ${GROUP_ID}
for the fpm containers and
ARG USER_ID=1000
ARG GROUP_ID=1000
RUN modify-user-ids phpcli ${USER_ID} ${GROUP_ID}
for the cli containers
The containers try to include all available modules. When using the containers, you can disable the modules in your config. If you miss something just add a PR, most of the modules are built with Docker PHP-Extension Installer, so if a module can be installed it is really easy to add it.
A python image (v3.10) is provided. It includes a user which can be mapped to your needs with
ARG USER_ID=1000
ARG GROUP_ID=1000
RUN modify-user-ids phpcli ${USER_ID} ${GROUP_ID}
Based on NodeJS v14 this image can be used to run selenium tests
Provides versions 7.6 and 8.9 of the search platform. Use
ARG USER_ID=1000
ARG GROUP_ID=1000
RUN modify-user-ids solr ${USER_ID} ${GROUP_ID} \
mkdir /opt/solr/lib \
chown -R solr.solr /opt/solr \
chown -R solr.solr /opt/docker-solr
USER solr
to run solar as your local user.
A slim debian with an additional user "ssh", mainly used for port forwarding. To use in your own context add this to your Dockerfile
ARG USER_ID=1000
ARG GROUP_ID=1000
RUN modify-ids ssh ${USER_ID} ${GROUP_ID}
See especially the docker-compose.yml in Docker Development Environment for more details.