mirror of
https://github.com/mykitserver/docker-limesurvey.git
synced 2025-12-06 16:39:11 +01:00
Compare commits
52 Commits
3.15.3+181
...
3.21.6+200
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a75590b106 | ||
|
|
cbea63bc20 | ||
|
|
597cf8b0cf | ||
|
|
07c937f620 | ||
|
|
65996ad6b8 | ||
|
|
cd55481064 | ||
|
|
dabd4ecce7 | ||
|
|
3454ed078a | ||
|
|
c2ee09bb8c | ||
|
|
8f1903aa15 | ||
|
|
a829071849 | ||
|
|
a968c01029 | ||
|
|
325416c959 | ||
|
|
44fac58a28 | ||
|
|
1a63aa37a7 | ||
|
|
e4d7e3550f | ||
|
|
26623a1d2c | ||
|
|
5b37d301ad | ||
|
|
9e5b903b28 | ||
|
|
69194ef8a8 | ||
|
|
4a6fd295f3 | ||
|
|
e75090d0fd | ||
|
|
93514b0fb9 | ||
|
|
2d23179e3e | ||
|
|
051a22eb41 | ||
|
|
2fdc20f862 | ||
|
|
b35d566cda | ||
|
|
2ef998b0d7 | ||
|
|
02e2c9dc3a | ||
|
|
68881a29f1 | ||
|
|
10c98a5eb4 | ||
|
|
a665b512e4 | ||
|
|
0e5571811f | ||
|
|
26a95472a7 | ||
|
|
423f4c6133 | ||
|
|
80bc3f4319 | ||
|
|
c30e0878e2 | ||
|
|
b44b4c2371 | ||
|
|
c655c4cf53 | ||
|
|
6f088023ae | ||
|
|
6531d6131f | ||
|
|
92548e8d6f | ||
|
|
07a9d72c17 | ||
|
|
fcb52d4114 | ||
|
|
9dcf0c94ea | ||
|
|
97a2506d3d | ||
|
|
90c03f7b92 | ||
|
|
27a563868d | ||
|
|
1e66840c63 | ||
|
|
88db810ec2 | ||
|
|
63f4fb4bbb | ||
|
|
5fc47ca735 |
18
README.md
18
README.md
@@ -29,7 +29,9 @@ LimeSurvey requires an external database (MySQL, PostgreSQL) to run. See *docker
|
|||||||
|
|
||||||
To preserve the uploaded files assign the upload folder into a volume. See *docker-compose.yml* for example.
|
To preserve the uploaded files assign the upload folder into a volume. See *docker-compose.yml* for example.
|
||||||
|
|
||||||
Path: */var/www/html/upload/*
|
Path: */var/www/html/upload/surveys*
|
||||||
|
|
||||||
|
**Hint**: The mounted directory must be owned by the webserver user (e.g. www-data)
|
||||||
|
|
||||||
# LimeSurvey Configuration
|
# LimeSurvey Configuration
|
||||||
|
|
||||||
@@ -62,6 +64,20 @@ To change to LimeSurvey configuration, you can mount a Volume into the Container
|
|||||||
|
|
||||||
For further details on the settings see: https://manual.limesurvey.org/Optional_settings#Advanced_Path_Settings
|
For further details on the settings see: https://manual.limesurvey.org/Optional_settings#Advanced_Path_Settings
|
||||||
|
|
||||||
|
# Running this image with docker-compose
|
||||||
|
|
||||||
|
The easiest way to get a fully featured and functional setup is using a docker-compose file. Several examples are provided in the repository.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose up
|
||||||
|
|
||||||
|
# Frontend
|
||||||
|
http://localhost:8080/
|
||||||
|
|
||||||
|
# Backend
|
||||||
|
http://localhost:8080/index.php/admin
|
||||||
|
```
|
||||||
|
|
||||||
# References
|
# References
|
||||||
|
|
||||||
- https://www.limesurvey.org/
|
- https://www.limesurvey.org/
|
||||||
|
|||||||
@@ -1,45 +1,72 @@
|
|||||||
FROM php:7.2-apache
|
FROM php:7.2-apache
|
||||||
LABEL maintainer="markus@martialblog.de"
|
LABEL maintainer="markus@martialblog.de"
|
||||||
ARG version='3.15.3+181108'
|
ARG version='3.21.6+200121'
|
||||||
|
ARG sha256_checksum='fa39e7a345ec94e2b02a0ed3d93bca6eab7080d6f1f6eed1b7f19e08576b3397'
|
||||||
|
|
||||||
# Install OS dependencies
|
# Install OS dependencies
|
||||||
RUN apt-get update && \
|
RUN set -ex; \
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
apt-get update && \
|
||||||
apt-get install --no-install-recommends -y \
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
libldap2-dev \
|
apt-get install --no-install-recommends -y \
|
||||||
zlib1g-dev \
|
\
|
||||||
libc-client-dev \
|
libldap2-dev \
|
||||||
libkrb5-dev \
|
libfreetype6-dev \
|
||||||
libpng-dev \
|
libjpeg-dev \
|
||||||
libpq-dev \
|
zlib1g-dev \
|
||||||
netcat \
|
libc-client-dev \
|
||||||
&& apt-get autoclean; apt-get autoremove && \
|
libkrb5-dev \
|
||||||
rm -rf /var/lib/apt/lists/*
|
libpng-dev \
|
||||||
|
libpq-dev \
|
||||||
|
netcat \
|
||||||
|
\
|
||||||
|
&& apt-get -y autoclean; apt-get -y autoremove; \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Link LDAP library for PHP ldap extension
|
# Link LDAP library for PHP ldap extension
|
||||||
RUN ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
|
RUN set -ex; \
|
||||||
# Configure PHP imap plugin
|
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
|
||||||
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl
|
|
||||||
|
|
||||||
# Install PHP Plugins
|
# Install PHP Plugins and Configure PHP imap plugin
|
||||||
RUN docker-php-ext-install -j5 \
|
RUN set -ex; \
|
||||||
gd \
|
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \
|
||||||
imap \
|
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
|
||||||
ldap \
|
docker-php-ext-install -j5 \
|
||||||
mbstring \
|
gd \
|
||||||
pdo \
|
imap \
|
||||||
pdo_mysql \
|
ldap \
|
||||||
pdo_pgsql \
|
mbstring \
|
||||||
pgsql \
|
pdo \
|
||||||
zip
|
pdo_mysql \
|
||||||
|
pdo_pgsql \
|
||||||
|
pgsql \
|
||||||
|
zip
|
||||||
|
|
||||||
# Download, unzip and chmod of LimeSurvey
|
ENV LIMESURVEY_VERSION=$version
|
||||||
|
|
||||||
|
# Apache configuration
|
||||||
|
RUN a2enmod headers rewrite remoteip; \
|
||||||
|
{\
|
||||||
|
echo RemoteIPHeader X-Real-IP ;\
|
||||||
|
echo RemoteIPTrustedProxy 10.0.0.0/8 ;\
|
||||||
|
echo RemoteIPTrustedProxy 172.16.0.0/12 ;\
|
||||||
|
echo RemoteIPTrustedProxy 192.168.0.0/16 ;\
|
||||||
|
} > /etc/apache2/conf-available/remoteip.conf;\
|
||||||
|
a2enconf remoteip
|
||||||
|
|
||||||
|
# Use the default production configuration
|
||||||
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
# Download, unzip and chmod LimeSurvey from official GitHub repository
|
||||||
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
|
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
|
||||||
|
|
||||||
RUN tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
|
RUN set -ex; \
|
||||||
rm "/tmp/${version}.tar.gz" && \
|
echo "${sha256_checksum} /tmp/${version}.tar.gz" | sha256sum -c - && \
|
||||||
chown -R www-data:www-data /var/www/html
|
\
|
||||||
|
tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
|
||||||
|
rm -f "/tmp/${version}.tar.gz" && \
|
||||||
|
chown -R www-data:www-data /var/www/html
|
||||||
|
|
||||||
COPY entrypoint.sh entrypoint.sh
|
COPY entrypoint.sh entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT ["/var/www/html/entrypoint.sh"]
|
ENTRYPOINT ["/var/www/html/entrypoint.sh"]
|
||||||
CMD ["apache2-foreground"]
|
CMD ["apache2-foreground"]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ services:
|
|||||||
context: fpm-alpine/
|
context: fpm-alpine/
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- /tmp/upload/:/var/www/html/upload/
|
- /tmp/upload/surveys:/var/www/html/upload/surveys
|
||||||
- lime:/var/www/html
|
- lime:/var/www/html
|
||||||
links:
|
links:
|
||||||
- lime-db
|
- lime-db
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ services:
|
|||||||
context: fpm/
|
context: fpm/
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- /tmp/upload/:/var/www/html/upload/
|
- /tmp/upload/surveys:/var/www/html/upload/surveys
|
||||||
- lime:/var/www/html
|
- lime:/var/www/html
|
||||||
links:
|
links:
|
||||||
- lime-db
|
- lime-db
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ services:
|
|||||||
context: apache/
|
context: apache/
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- /tmp/upload/:/var/www/html/upload/
|
- /tmp/upload/surveys:/var/www/html/upload/surveys
|
||||||
links:
|
links:
|
||||||
- lime-db
|
- lime-db
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ services:
|
|||||||
context: apache/
|
context: apache/
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- /tmp/upload/:/var/www/html/upload/
|
- /tmp/upload/surveys:/var/www/html/upload/surveys
|
||||||
links:
|
links:
|
||||||
- lime-db
|
- lime-db
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -1,38 +1,48 @@
|
|||||||
FROM php:7.2-fpm-alpine
|
FROM php:7.2-fpm-alpine
|
||||||
LABEL maintainer="markus@martialblog.de"
|
LABEL maintainer="markus@martialblog.de"
|
||||||
ARG version='3.15.3+181108'
|
ARG version='3.21.6+200121'
|
||||||
|
ARG sha256_checksum='fa39e7a345ec94e2b02a0ed3d93bca6eab7080d6f1f6eed1b7f19e08576b3397'
|
||||||
|
|
||||||
# Install OS dependencies
|
# Install OS dependencies
|
||||||
RUN apk add --no-cache --virtual .build-deps \
|
RUN set -ex; \
|
||||||
libpng-dev \
|
apk add --no-cache --virtual .build-deps \
|
||||||
openldap-dev \
|
freetype-dev \
|
||||||
imap-dev \
|
libpng-dev \
|
||||||
postgresql-dev && \
|
libjpeg-turbo-dev \
|
||||||
apk add --no-cache netcat-openbsd bash
|
openldap-dev \
|
||||||
|
imap-dev \
|
||||||
|
postgresql-dev && \
|
||||||
|
apk add --no-cache netcat-openbsd bash
|
||||||
|
|
||||||
# Install PHP Plugins
|
# Install PHP Plugins
|
||||||
RUN docker-php-ext-configure imap --with-imap-ssl && \
|
RUN set -ex; \
|
||||||
docker-php-ext-install \
|
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr ; \
|
||||||
gd \
|
docker-php-ext-configure imap --with-imap-ssl && \
|
||||||
imap \
|
docker-php-ext-install \
|
||||||
ldap \
|
gd \
|
||||||
mbstring \
|
imap \
|
||||||
pdo \
|
ldap \
|
||||||
pdo_mysql \
|
mbstring \
|
||||||
pdo_pgsql \
|
pdo \
|
||||||
pgsql \
|
pdo_mysql \
|
||||||
zip
|
pdo_pgsql \
|
||||||
|
pgsql \
|
||||||
|
zip
|
||||||
|
|
||||||
# Download, unzip and chmod of LimeSurvey
|
# Download, unzip and chmod of LimeSurvey
|
||||||
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
|
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
|
||||||
|
|
||||||
RUN tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
|
RUN set -ex; \
|
||||||
rm -rf "/tmp/${version}.tar.gz" \
|
echo "${sha256_checksum} /tmp/${version}.tar.gz" | sha256sum -c - && \
|
||||||
/var/www/html/docs \
|
\
|
||||||
/var/www/html/tests \
|
tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
|
||||||
/var/www/html/*.md && \
|
\
|
||||||
chown -R www-data:root /var/www/ ; \
|
rm -rf "/tmp/${version}.tar.gz" \
|
||||||
chmod -R g=u /var/www
|
/var/www/html/docs \
|
||||||
|
/var/www/html/tests \
|
||||||
|
/var/www/html/*.md && \
|
||||||
|
chown -R www-data:root /var/www/ ; \
|
||||||
|
chmod -R g=u /var/www
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|||||||
@@ -1,44 +1,57 @@
|
|||||||
FROM php:7.2-fpm
|
FROM php:7.2-fpm
|
||||||
LABEL maintainer="markus@martialblog.de"
|
LABEL maintainer="markus@martialblog.de"
|
||||||
ARG version='3.15.3+181108'
|
ARG version='3.21.6+200121'
|
||||||
|
ARG sha256_checksum='fa39e7a345ec94e2b02a0ed3d93bca6eab7080d6f1f6eed1b7f19e08576b3397'
|
||||||
|
|
||||||
# Install OS dependencies
|
# Install OS dependencies
|
||||||
RUN apt-get update && \
|
RUN set -ex; \
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
apt-get update && \
|
||||||
apt-get install --no-install-recommends -y \
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
libldap2-dev \
|
apt-get install --no-install-recommends -y \
|
||||||
zlib1g-dev \
|
\
|
||||||
libc-client-dev \
|
libldap2-dev \
|
||||||
libkrb5-dev \
|
libfreetype6-dev \
|
||||||
libpng-dev \
|
libjpeg-dev \
|
||||||
libpq-dev \
|
zlib1g-dev \
|
||||||
netcat \
|
libc-client-dev \
|
||||||
&& apt-get autoclean; apt-get autoremove && \
|
libkrb5-dev \
|
||||||
rm -rf /var/lib/apt/lists/*
|
libpng-dev \
|
||||||
|
libpq-dev \
|
||||||
|
netcat \
|
||||||
|
\
|
||||||
|
&& apt-get -y autoclean; apt-get -y autoremove; \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Link LDAP library for PHP ldap extension
|
# Link LDAP library for PHP ldap extension
|
||||||
RUN ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
|
RUN set -ex; \
|
||||||
|
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
|
||||||
|
|
||||||
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl
|
# Install PHP Plugins and Configure PHP imap plugin
|
||||||
|
RUN set -ex; \
|
||||||
|
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \
|
||||||
|
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
|
||||||
|
docker-php-ext-install -j5 \
|
||||||
|
gd \
|
||||||
|
imap \
|
||||||
|
ldap \
|
||||||
|
mbstring \
|
||||||
|
pdo \
|
||||||
|
pdo_mysql \
|
||||||
|
pdo_pgsql \
|
||||||
|
pgsql \
|
||||||
|
zip
|
||||||
|
|
||||||
# Install PHP Plugins
|
ENV LIMESURVEY_VERSION=$version
|
||||||
RUN docker-php-ext-install -j5 \
|
|
||||||
gd \
|
|
||||||
imap \
|
|
||||||
ldap \
|
|
||||||
mbstring \
|
|
||||||
pdo \
|
|
||||||
pdo_mysql \
|
|
||||||
pdo_pgsql \
|
|
||||||
pgsql \
|
|
||||||
zip
|
|
||||||
|
|
||||||
# Download, unzip and chmod of LimeSurvey
|
# Download, unzip and chmod LimeSurvey from official GitHub repository
|
||||||
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
|
ADD "https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz" /tmp
|
||||||
|
|
||||||
RUN tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
|
RUN set -ex; \
|
||||||
rm "/tmp/${version}.tar.gz" && \
|
echo "${sha256_checksum} /tmp/${version}.tar.gz" | sha256sum -c - && \
|
||||||
chown -R www-data:www-data /var/www/html
|
\
|
||||||
|
tar xzvf "/tmp/${version}.tar.gz" --strip-components=1 -C /var/www/html/ && \
|
||||||
|
rm -f "/tmp/${version}.tar.gz" && \
|
||||||
|
chown -R www-data:www-data /var/www/html
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
|
|
||||||
|
|||||||
8
makefile
Normal file
8
makefile
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
.PHONY: apache fpm fpm-alpine
|
||||||
|
|
||||||
|
apache:
|
||||||
|
docker build --pull -t limesurvey:apache apache
|
||||||
|
fpm-alpine:
|
||||||
|
docker build --pull -t limesurvey:fpm-alpine fpm-alpine
|
||||||
|
fpm:
|
||||||
|
docker build --pull -t limesurvey:fpm fpm
|
||||||
@@ -1 +0,0 @@
|
|||||||
feedparser==5.2.1
|
|
||||||
63
upgrade.py
63
upgrade.py
@@ -1,63 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import feedparser
|
|
||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
dockerfile_apache = 'apache/Dockerfile'
|
|
||||||
dockerfile_fpm = 'fpm/Dockerfile'
|
|
||||||
dockerfile_alpine = 'fpm-alpine/Dockerfile'
|
|
||||||
|
|
||||||
limesv_feed_url = 'https://github.com/LimeSurvey/LimeSurvey/releases.atom'
|
|
||||||
docker_feed_url = 'https://github.com/martialblog/docker-limesurvey/releases.atom'
|
|
||||||
|
|
||||||
limesv_feed = feedparser.parse(limesv_feed_url)
|
|
||||||
docker_feed = feedparser.parse(docker_feed_url)
|
|
||||||
|
|
||||||
limesv_current_release = limesv_feed.entries[0].title_detail.value
|
|
||||||
docker_current_release = docker_feed.entries[0].title_detail.value
|
|
||||||
|
|
||||||
argumentparser = argparse.ArgumentParser(description='Updates the LimeSurvey Version in the Dockerfiles')
|
|
||||||
argumentparser.add_argument('--noop', dest='noop', action="store_true", required=False, help="Don't push just commit")
|
|
||||||
argumentparser.add_argument('--check', dest='check', action="store_true", required=False, help="Only check if there's a new version available")
|
|
||||||
|
|
||||||
cmdargs = argumentparser.parse_args()
|
|
||||||
|
|
||||||
if limesv_current_release == docker_current_release:
|
|
||||||
print('Nothing to do.')
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
print('New Version {} available.'.format(limesv_current_release))
|
|
||||||
|
|
||||||
if cmdargs.check:
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
commit_message = 'Updating to Version {}'.format(limesv_current_release)
|
|
||||||
|
|
||||||
# Dockerfiles
|
|
||||||
regexp = 's/[0-9]+\.[0-9]+\.[0-9]+[0-9]*/{new_version}/'.format(new_version=limesv_current_release)
|
|
||||||
subprocess.call(['sed', '-i', '-e', regexp, dockerfile_apache])
|
|
||||||
subprocess.call(['sed', '-i', '-e', regexp, dockerfile_fpm])
|
|
||||||
subprocess.call(['sed', '-i', '-e', regexp, dockerfile_alpine])
|
|
||||||
print('> Updated Dockerfiles')
|
|
||||||
|
|
||||||
# Git Commit/Tag
|
|
||||||
# subprocess.call(['git', 'checkout', '-b', limesv_current_release])
|
|
||||||
subprocess.call(['git', 'add', dockerfile_apache])
|
|
||||||
subprocess.call(['git', 'add', dockerfile_fpm])
|
|
||||||
subprocess.call(['git', 'commit', '-m', commit_message])
|
|
||||||
subprocess.call(['git', 'tag', limesv_current_release])
|
|
||||||
print('> Created new Commit and Tag')
|
|
||||||
|
|
||||||
if cmdargs.noop:
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
# Git Push
|
|
||||||
# subprocess.call(['git', 'push', 'origin', limesv_current_release])
|
|
||||||
subprocess.call(['git', 'push'])
|
|
||||||
subprocess.call(['git', 'push', 'origin', '--tags'])
|
|
||||||
print('> Pushed to new Branch')
|
|
||||||
|
|
||||||
sys.exit(0)
|
|
||||||
32
upgrade.sh
Executable file
32
upgrade.sh
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Upgrade script
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]
|
||||||
|
then
|
||||||
|
echo 'Pass new LimeSurvey Version tag:'
|
||||||
|
echo 'upgrade.sh 3.15.8+190130'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
NEW_VERSION=$1
|
||||||
|
|
||||||
|
grep -qc $NEW_VERSION apache/Dockerfile fpm/Dockerfile fpm-alpine/Dockerfile
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "Already at version ${NEW_VERSION}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Download, unzip and chmod LimeSurvey from official GitHub repository
|
||||||
|
wget -P /tmp "https://github.com/LimeSurvey/LimeSurvey/archive/${NEW_VERSION}.tar.gz"
|
||||||
|
|
||||||
|
SHA256_CHECKSUM=$(sha256sum "/tmp/${NEW_VERSION}.tar.gz" | awk '{ print $1 }')
|
||||||
|
|
||||||
|
# Update lines in the files
|
||||||
|
sed -r -i -e "s/[0-9]+(\.[0-9]+)+\+[0-9]+/$NEW_VERSION/" apache/Dockerfile fpm/Dockerfile fpm-alpine/Dockerfile
|
||||||
|
sed -r -i -e "s/[A-Fa-f0-9]{64}/$SHA256_CHECKSUM/" apache/Dockerfile fpm/Dockerfile fpm-alpine/Dockerfile
|
||||||
|
|
||||||
|
# After that, check and commit
|
||||||
Reference in New Issue
Block a user