Compare commits

...

39 Commits

Author SHA1 Message Date
Markus Opolka
456a2ab4d2 Upgrading to LTS Version 3.26.2+210503 2021-05-11 08:22:14 +02:00
Markus Opolka
fd744e5c46 Update README 2021-05-11 08:21:17 +02:00
Markus Opolka
f1b7efb2d5 Add configuration to run apache containers as www-data user (#61)
- in preparation for changing the default to www-data,
   which will happen at some time in the future
2021-05-09 11:35:41 +02:00
Markus Opolka
74b3f31ee4 Upgrading to Version 4.5.2+210426 2021-05-05 12:40:28 +02:00
Markus Opolka
fc6f655cf7 Upgrading to LTS Version 3.26.1+210427 2021-05-05 12:39:26 +02:00
Michael Prankl
01f6b41082 Customize Apache listen port (#59)
* Overwrite apache listen port in Apache configuration if configured via environment variable LISTEN_PORT
* Add documenation to README
* Add default value to ENV vars documentation

Co-authored-by: Michael Prankl <michael.prankl@muenchen.de>
2021-05-01 13:12:43 +02:00
Markus Opolka
c8d36cf425 Upgrading to Version 4.5.1+210420 2021-04-26 19:02:41 +02:00
Markus Opolka
0f7900e237 Upgrading to LTS Version 3.26.0+210419 2021-04-26 19:01:38 +02:00
Markus Opolka
a782896897 Upgrading to Version 4.5.0+210412 2021-04-19 17:53:54 +02:00
Markus Opolka
ce70ec3000 Upgrading to LTS Version 3.25.22+210413 2021-04-19 17:51:31 +02:00
Markus Opolka
0403aa1208 Upgrading to Version 4.4.16+210406 2021-04-12 17:02:11 +02:00
Markus Opolka
5a011e6818 Upgrading to LTS Version 3.25.21+210407 2021-04-12 17:01:30 +02:00
Markus Opolka
bb23531c6d Upgrading to Version 4.4.15+210329 2021-04-07 17:34:02 +02:00
Markus Opolka
69e8bcec7e Upgrading to LTS Version 3.25.20+210330 2021-04-07 17:33:18 +02:00
Markus Opolka
d26552bb6f Merge pull request #55 from PabloCastellano/master
Use docker volumes for postgres database
2021-04-04 07:26:02 +02:00
Pablo Castellano
1360fb8001 Use docker volumes for postgres database 2021-04-03 11:26:30 +02:00
Markus Opolka
fceae6b3cd Upgrading to Version 4.4.14+210322 2021-03-30 08:00:45 +02:00
Markus Opolka
b62a83ac83 Upgrading to LTS Version 3.25.19+210323 2021-03-30 07:59:56 +02:00
Markus Opolka
d106c2ceb6 Merge pull request #53 from martialblog/hadolint
Add Hadolint to CI
2021-03-22 20:14:46 +01:00
Markus Opolka
0c4690c97a Add hadolint to CI 2021-03-22 20:06:08 +01:00
Markus Opolka
ebb51363a1 Optimise nginx certbot example Dockerfile 2021-03-22 20:05:30 +01:00
Markus Opolka
debb4037a2 Upgrading to Version 4.4.13+210315 2021-03-22 19:45:58 +01:00
Markus Opolka
d7751f41d4 Upgrading to LTS Version 3.25.18+210316 2021-03-22 19:44:47 +01:00
Markus Opolka
47be732839 Merge pull request #52 from martialblog/fix-gd
Fix gd installation and add tidy/sodium lib
2021-03-22 19:43:58 +01:00
Markus Opolka
7da025f19a Fix gd installation and add tidy/sodium lib 2021-03-21 11:15:29 +01:00
Markus Opolka
cefd0a5c75 Upgrading to Version 4.4.12+210308 2021-03-16 06:29:22 +01:00
Markus Opolka
086903f0b4 Upgrading to LTS Version 3.25.17+210309 2021-03-16 06:28:36 +01:00
Markus Opolka
a619f5b8b7 Upgrading to Version 4.4.11+210301 2021-03-08 18:05:57 +01:00
Markus Opolka
f0c42a8bc2 Upgrading to LTS Version 3.25.16+210302 2021-03-08 18:05:00 +01:00
Markus Opolka
a6668c1fd2 Upgrading to Version 4.4.10+210222 2021-03-01 13:17:50 +01:00
Markus Opolka
ddcd2c868a Upgrading to LTS Version 3.25.15+210223 2021-03-01 13:17:08 +01:00
Markus Opolka
e3c0c3a9d0 Upgrading to Version 4.4.9+210219 2021-02-23 07:26:49 +01:00
Markus Opolka
eb1354a42a Upgrading to LTS Version 3.25.14+210218 2021-02-23 07:25:57 +01:00
Markus Opolka
448fb092a6 Upgrading to Version 4.4.8+210217 2021-02-17 16:16:10 +01:00
Markus Opolka
97c806aada Upgrading to LTS Version 3.25.12+210211 2021-02-17 16:15:11 +01:00
Markus Opolka
263b64e9f9 Upgrading to Version 4.4.6+210214 2021-02-12 17:33:54 +01:00
Markus Opolka
bab97c1eab Upgrading to Version 4.4.5+210213 2021-02-12 05:55:39 +01:00
Markus Opolka
064611ced5 Upgrading to Version 4.4.3+210209 2021-02-10 09:22:48 +01:00
Markus Opolka
c7ea723349 Upgrading to LTS Version 3.25.11+210210 2021-02-10 09:22:00 +01:00
15 changed files with 114 additions and 36 deletions

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
# force LF in entrypoint.sh
entrypoint.sh text eol=lf

View File

@@ -2,12 +2,17 @@ sudo: required
language: bash
services:
- docker
matrix:
install:
jobs:
include:
- env: HADOLINT="${HOME}/hadolint"
script:
- curl -sL -o ${HADOLINT} "https://github.com/hadolint/hadolint/releases/download/v1.23.0/hadolint-$(uname -s)-$(uname -m)"
- chmod 700 ${HADOLINT}
- git ls-files --exclude='Dockerfile*' --ignored | xargs --max-lines=1 ${HADOLINT} --ignore DL4006 --ignore DL3008 --ignore DL3018
- env: TAG=martialblog/limesurvey-apache
script: cd 3.0/apache; docker build -q -t $TAG . && cd ../..; ./tests/run.sh $TAG
script: cd 4.0/apache; docker build -q -t $TAG . && cd ../..; ./tests/run.sh $TAG
- env: TAG=martialblog/limesurvey-fpm
script: cd 3.0/fpm; docker build -q -t $TAG . && cd ../..; ./tests/run.sh $TAG
script: cd 4.0/fpm; docker build -q -t $TAG . && cd ../..; ./tests/run.sh $TAG
- env: TAG=martialblog/limesurvey-alpine
script: cd 3.0/fpm; docker build -q -t $TAG . && cd ../..; ./tests/run.sh $TAG
script: cd 4.0/fpm; docker build -q -t $TAG . && cd ../..; ./tests/run.sh $TAG

View File

@@ -1,7 +1,9 @@
FROM php:7.4-apache
LABEL maintainer="markus@martialblog.de"
ARG version='3.25.10+210128'
ARG sha256_checksum='6f27b8566a8afe49db57514a84c6dc9ee98ffc07769a2b51d3682e48f1a4af88'
ARG version='3.26.2+210503'
ARG sha256_checksum='f76f1983e9dbf432346679c5697189a64e41a795facffa392bb9c66ea0de5675'
ARG USER=root
ARG LISTEN_PORT=80
# Install OS dependencies
RUN set -ex; \
@@ -19,6 +21,8 @@ RUN set -ex; \
libpng-dev \
libpq-dev \
libzip-dev \
libtidy-dev \
libsodium-dev \
netcat \
\
&& apt-get -y autoclean; apt-get -y autoremove; \
@@ -30,7 +34,7 @@ RUN set -ex; \
# Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \
docker-php-ext-configure gd && \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
docker-php-ext-install -j5 \
exif \
@@ -42,6 +46,8 @@ RUN set -ex; \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip
ENV LIMESURVEY_VERSION=$version
@@ -67,9 +73,10 @@ RUN set -ex; \
\
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \
rm -f "/tmp/limesurvey.tar.gz" && \
chown -R www-data:www-data /var/www/html
chown -R www-data:www-data /var/www/html /etc/apache2
WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh
USER $USER
ENTRYPOINT ["/var/www/html/entrypoint.sh"]
CMD ["apache2-foreground"]

View File

@@ -23,6 +23,8 @@ URL_FORMAT=${URL_FORMAT:-'path'}
DEBUG=${DEBUG:-0}
DEBUG_SQL=${DEBUG_SQL:-0}
LISTEN_PORT=${LISTEN_PORT:-"80"}
if [ -z "$DB_PASSWORD" ]; then
echo >&2 'Error: Missing DB_PASSWORD'
exit 1
@@ -33,6 +35,11 @@ if [ -z "$ADMIN_PASSWORD" ]; then
exit 1
fi
if [ "$LISTEN_PORT" != "80" ]; then
echo "Info: Customizing Apache Listen port to $LISTEN_PORT"
sed -i "s/80/$LISTEN_PORT/" /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf
fi
# Check if database is available
if [ -z "$DB_SOCK" ]; then
until nc -z -v -w30 $DB_HOST $DB_PORT

View File

@@ -1,7 +1,7 @@
FROM php:7.4-fpm-alpine
LABEL maintainer="markus@martialblog.de"
ARG version='3.25.10+210128'
ARG sha256_checksum='6f27b8566a8afe49db57514a84c6dc9ee98ffc07769a2b51d3682e48f1a4af88'
ARG version='3.26.2+210503'
ARG sha256_checksum='f76f1983e9dbf432346679c5697189a64e41a795facffa392bb9c66ea0de5675'
# Install OS dependencies
RUN set -ex; \
@@ -10,6 +10,8 @@ RUN set -ex; \
libpng-dev \
libzip-dev \
libjpeg-turbo-dev \
tidyhtml-dev \
libsodium-dev \
openldap-dev \
oniguruma-dev \
imap-dev \
@@ -18,7 +20,7 @@ RUN set -ex; \
# Install PHP Plugins
RUN set -ex; \
docker-php-ext-configure gd && \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \
docker-php-ext-configure imap --with-imap-ssl && \
docker-php-ext-install \
gd \
@@ -29,6 +31,8 @@ RUN set -ex; \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip
# Download, unzip and chmod of LimeSurvey
@@ -48,6 +52,7 @@ RUN set -ex; \
EXPOSE 9000
WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh
ENTRYPOINT ["/var/www/html/entrypoint.sh"]
CMD ["php-fpm"]

View File

@@ -1,7 +1,7 @@
FROM php:7.4-fpm
LABEL maintainer="markus@martialblog.de"
ARG version='3.25.10+210128'
ARG sha256_checksum='6f27b8566a8afe49db57514a84c6dc9ee98ffc07769a2b51d3682e48f1a4af88'
ARG version='3.26.2+210503'
ARG sha256_checksum='f76f1983e9dbf432346679c5697189a64e41a795facffa392bb9c66ea0de5675'
# Install OS dependencies
RUN set -ex; \
@@ -19,6 +19,8 @@ RUN set -ex; \
libpng-dev \
libpq-dev \
libzip-dev \
libtidy-dev \
libsodium-dev \
netcat \
\
&& apt-get -y autoclean; apt-get -y autoremove; \
@@ -30,7 +32,7 @@ RUN set -ex; \
# Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \
docker-php-ext-configure gd && \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
docker-php-ext-install -j5 \
exif \
@@ -42,6 +44,8 @@ RUN set -ex; \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip
ENV LIMESURVEY_VERSION=$version
@@ -58,6 +62,7 @@ RUN set -ex; \
EXPOSE 9000
WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh
ENTRYPOINT ["/var/www/html/entrypoint.sh"]
CMD ["php-fpm"]

View File

@@ -1,7 +1,9 @@
FROM php:7.4-apache
LABEL maintainer="markus@martialblog.de"
ARG version='4.4.2+210208'
ARG sha256_checksum='6bb541d5da9c1a3bcc53284512f7bebadbbe7a966f7fb0b07d9b48cd55111483'
ARG version='4.5.2+210426'
ARG sha256_checksum='001c3e416e319d1b64e502620fa2a9a32e69d9b4db2f6376f4a6293b43a063ea'
ARG USER=root
ARG LISTEN_PORT=80
# Install OS dependencies
RUN set -ex; \
@@ -19,6 +21,8 @@ RUN set -ex; \
libpng-dev \
libpq-dev \
libzip-dev \
libtidy-dev \
libsodium-dev \
netcat \
curl \
\
@@ -31,7 +35,7 @@ RUN set -ex; \
# Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \
docker-php-ext-configure gd && \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
docker-php-ext-install -j5 \
exif \
@@ -43,6 +47,8 @@ RUN set -ex; \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip
ENV LIMESURVEY_VERSION=$version
@@ -68,9 +74,10 @@ RUN set -ex; \
\
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \
rm -f "/tmp/limesurvey.tar.gz" && \
chown -R www-data:www-data /var/www/html
chown -R www-data:www-data /var/www/html /etc/apache2
WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh
USER $USER
ENTRYPOINT ["/var/www/html/entrypoint.sh"]
CMD ["apache2-foreground"]

View File

@@ -27,6 +27,8 @@ URL_FORMAT=${URL_FORMAT:-'path'}
DEBUG=${DEBUG:-0}
DEBUG_SQL=${DEBUG_SQL:-0}
LISTEN_PORT=${LISTEN_PORT:-"80"}
if [ -z "$DB_PASSWORD" ]; then
echo >&2 'Error: Missing DB_PASSWORD'
exit 1
@@ -37,6 +39,11 @@ if [ -z "$ADMIN_PASSWORD" ]; then
exit 1
fi
if [ "$LISTEN_PORT" != "80" ]; then
echo "Info: Customizing Apache Listen port to $LISTEN_PORT"
sed -i "s/80/$LISTEN_PORT/" /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf
fi
# Check if database is available
if [ -z "$DB_SOCK" ]; then
until nc -z -v -w30 $DB_HOST $DB_PORT

View File

@@ -1,7 +1,7 @@
FROM php:7.4-fpm-alpine
LABEL maintainer="markus@martialblog.de"
ARG version='4.4.2+210208'
ARG sha256_checksum='6bb541d5da9c1a3bcc53284512f7bebadbbe7a966f7fb0b07d9b48cd55111483'
ARG version='4.5.2+210426'
ARG sha256_checksum='001c3e416e319d1b64e502620fa2a9a32e69d9b4db2f6376f4a6293b43a063ea'
# Install OS dependencies
RUN set -ex; \
@@ -10,6 +10,8 @@ RUN set -ex; \
libpng-dev \
libzip-dev \
libjpeg-turbo-dev \
tidyhtml-dev \
libsodium-dev \
openldap-dev \
oniguruma-dev \
imap-dev \
@@ -18,7 +20,7 @@ RUN set -ex; \
# Install PHP Plugins
RUN set -ex; \
docker-php-ext-configure gd && \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \
docker-php-ext-configure imap --with-imap-ssl && \
docker-php-ext-install \
exif \
@@ -30,6 +32,8 @@ RUN set -ex; \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip
# Download, unzip and chmod of LimeSurvey
@@ -49,6 +53,7 @@ RUN set -ex; \
EXPOSE 9000
WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh
ENTRYPOINT ["/var/www/html/entrypoint.sh"]
CMD ["php-fpm"]

View File

@@ -1,7 +1,7 @@
FROM php:7.4-fpm
LABEL maintainer="markus@martialblog.de"
ARG version='4.4.2+210208'
ARG sha256_checksum='6bb541d5da9c1a3bcc53284512f7bebadbbe7a966f7fb0b07d9b48cd55111483'
ARG version='4.5.2+210426'
ARG sha256_checksum='001c3e416e319d1b64e502620fa2a9a32e69d9b4db2f6376f4a6293b43a063ea'
# Install OS dependencies
RUN set -ex; \
@@ -19,6 +19,8 @@ RUN set -ex; \
libpng-dev \
libpq-dev \
libzip-dev \
libtidy-dev \
libsodium-dev \
netcat \
\
&& apt-get -y autoclean; apt-get -y autoremove; \
@@ -30,7 +32,7 @@ RUN set -ex; \
# Install PHP Plugins and Configure PHP imap plugin
RUN set -ex; \
docker-php-ext-configure gd && \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr && \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
docker-php-ext-install -j5 \
exif \
@@ -42,6 +44,8 @@ RUN set -ex; \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip
ENV LIMESURVEY_VERSION=$version
@@ -58,6 +62,7 @@ RUN set -ex; \
EXPOSE 9000
WORKDIR /var/www/html
COPY entrypoint.sh entrypoint.sh
ENTRYPOINT ["/var/www/html/entrypoint.sh"]
CMD ["php-fpm"]

View File

@@ -13,15 +13,19 @@ Dockerfile to build a [LimeSurvey](https://limesurvey.org) Image for the Docker
## Supported tags and respective Dockerfile links
- [`4-apache`, `4.<BUILD-NUMBER>-apache`, `latest` ](https://github.com/martialblog/docker-limesurvey/blob/master/4.0/apache/Dockerfile)
- [`4-apache-rootless`, `4.<BUILD-NUMBER>-apache-rootless`](https://github.com/martialblog/docker-limesurvey/blob/master/4.0/apache/Dockerfile)
- [`4-fpm`, `4.<BUILD-NUMBER>-fpm`](https://github.com/martialblog/docker-limesurvey/blob/master/4.0/fpm/Dockerfile)
- [`4-fpm-alpine`, `4.<BUILD-NUMBER>-fpm-alpine`](https://github.com/martialblog/docker-limesurvey/blob/master/4.0/fpm-alpine/Dockerfile)
- [`3-apache`, `3.<BUILD-NUMBER>-apache`](https://github.com/martialblog/docker-limesurvey/blob/master/3.0/apache/Dockerfile)
- [`3-apache-rootless`, `3.<BUILD-NUMBER>-apache-rootless`](https://github.com/martialblog/docker-limesurvey/blob/master/3.0/apache/Dockerfile)
- [`3-fpm`, `3.<BUILD-NUMBER>-fpm`](https://github.com/martialblog/docker-limesurvey/blob/master/3.0/fpm/Dockerfile)
- [`3-fpm-alpine`, `3.<BUILD-NUMBER>-fpm-alpine`](https://github.com/martialblog/docker-limesurvey/blob/master/3.0/fpm-alpine/Dockerfile)
# Using the Apache Image
The apache image comes with an Apache Webserver and PHP installed.
The `apache` image comes with an Apache Webserver and PHP installed.
This image is also available as `rootless` with `www-data` as default user.
## Apache Configuration
@@ -31,6 +35,8 @@ To change to Apache Webserver configuration, mount a Volume into the Container a
See the example configuration provided.
If you want to run Apache on a non-privileged port inside the container, just specify a environment variable `LISTEN_PORT` (e.g. `LISTEN_PORT=8080`).
# Using the fpm Image
To use the fpm image, you need an additional web server that can proxy http-request to the fpm-port of the container. See *docker-compose.fpm.yml* for example.
@@ -112,6 +118,7 @@ For further details on the settings see: https://manual.limesurvey.org/Data_encr
| ENCRYPT_KEYPAIR | Data encryption keypair |
| ENCRYPT_PUBLIC_KEY | Data encryption public key |
| ENCRYPT_SECRET_KEY | Data encryption secret key |
| LISTEN_PORT | Apache: Listen port. Default: 80 |
For further details on the settings see: https://manual.limesurvey.org/Optional_settings#Advanced_Path_Settings

View File

@@ -22,8 +22,10 @@ services:
depends_on:
- db
db:
image: postgres:9.6-alpine
image: postgres:10-alpine
restart: always
volumes:
- db-data:/var/lib/postgresql
environment:
- POSTGRES_USER=limesurvey
- POSTGRES_DB=limesurvey
@@ -31,3 +33,4 @@ services:
volumes:
limesurvey:
db-data:

View File

@@ -20,7 +20,12 @@ services:
- "ADMIN_PASSWORD=foobar"
lime-db:
image: postgres:10
volumes:
- db-data:/var/lib/postgresql
environment:
- "POSTGRES_USER=limesurvey"
- "POSTGRES_DB=limesurvey"
- "POSTGRES_PASSWORD=secret"
volumes:
db-data:

View File

@@ -2,8 +2,12 @@
apache3:
docker build --pull -t martialblog/limesurvey:3-apache 3.0/apache
apache3-rootless:
docker build --pull --build-arg USER=www-data --build-arg LISTEN_PORT=8080 -t martialblog/limesurvey:3-apache-rootless 3.0/apache
apache4:
docker build --pull -t martialblog/limesurvey:4-apache 4.0/apache
docker build --pull -t martialblog/limesurvey:3-apache 3.0/apache
apache4-rootless:
docker build --pull --build-arg USER=www-data --build-arg LISTEN_PORT=8080 -t martialblog/limesurvey:4-apache-rootless 4.0/apache
fpm-alpine3:
docker build --pull -t martialblog/limesurvey:3-fpm-alpine 3.0/fpm-alpine
fpm-alpine4:

View File

@@ -1,10 +1,14 @@
FROM nginx
RUN apt-get update && \
apt-get install -y certbot curl python-certbot-nginx && \
apt-get -y autoclean; apt-get -y autoremove; \
rm -rf /var/lib/apt/lists/*
FROM nginx:stable
LABEL maintainer="markus@martialblog.de"
RUN set -ex; \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
certbot curl python-certbot-nginx && \
apt-get -y autoclean; apt-get -y autoremove; \
rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /entrypoint.sh
RUN chmod 700 /entrypoint.sh
CMD ["/entrypoint.sh"]