2018-04-30 23:13:11 +02:00
|
|
|
FROM php
|
2018-01-24 15:18:55 +01:00
|
|
|
MAINTAINER Disassembler <disassembler@dasm.cz>
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
# Install runtime dependencies
|
2018-01-24 15:52:13 +01:00
|
|
|
apk --no-cache add php7-curl php7-imap php7-mysqli php7-pdo_mysql
|
2018-01-24 15:18:55 +01:00
|
|
|
|
|
|
|
RUN \
|
|
|
|
# Download Ushahidi
|
2018-08-23 10:43:27 +02:00
|
|
|
wget https://github.com/ushahidi/platform-release/releases/download/v3.12.1/ushahidi-platform-release-v3.12.1.tar.gz -O /tmp/ushahidi.tgz \
|
2018-01-24 15:18:55 +01:00
|
|
|
&& tar xzf /tmp/ushahidi.tgz -C /tmp \
|
2018-08-23 10:43:27 +02:00
|
|
|
&& mv /tmp/ushahidi-platform-release-v3.12.1/html /srv/ushahidi \
|
2018-01-24 15:18:55 +01:00
|
|
|
# Create OS user
|
|
|
|
&& addgroup -S -g 8014 ushahidi \
|
|
|
|
&& adduser -S -u 8014 -h /srv/ushahidi -s /bin/false -g ushahidi -G ushahidi ushahidi \
|
2018-02-02 20:16:26 +01:00
|
|
|
&& chown -R ushahidi:ushahidi /srv/ushahidi/platform/application/logs /srv/ushahidi/platform/application/cache /srv/ushahidi/platform/application/media/uploads \
|
2018-01-24 15:18:55 +01:00
|
|
|
# Cleanup
|
2018-08-23 10:43:27 +02:00
|
|
|
&& rm -rf /tmp/ushahidi.tgz /tmp/ushahidi-platform-release-v3.12.1
|
2018-01-24 15:18:55 +01:00
|
|
|
|
2018-08-23 10:43:27 +02:00
|
|
|
COPY docker/etc/ /etc/
|
|
|
|
|
|
|
|
COPY --chown=8014:8014 docker/srv/ushahidi/ /srv/ushahidi/
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
# Patch Previewers
|
|
|
|
cd /srv/ushahidi \
|
|
|
|
&& patch -p0 <aura.patch
|
2018-01-24 15:18:55 +01:00
|
|
|
|
2018-02-02 20:16:26 +01:00
|
|
|
VOLUME ["/srv/ushahidi/platform/application/media/uploads"]
|
2018-03-25 23:21:54 +02:00
|
|
|
EXPOSE 8080
|
2018-01-24 15:18:55 +01:00
|
|
|
|
|
|
|
CMD ["s6-svscan", "/etc/services.d"]
|