Spotter-VM/ushahidi/Dockerfile

33 lines
1.1 KiB
Docker
Raw Normal View History

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 \
&& 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
VOLUME ["/srv/ushahidi/platform/application/media/uploads"]
EXPOSE 8080
2018-01-24 15:18:55 +01:00
CMD ["s6-svscan", "/etc/services.d"]