-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
48 lines (40 loc) · 1.37 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM php:7.2-apache
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
&& docker-php-ext-configure gd \
--with-png-dir=/usr/ \
--with-jpeg-dir=/usr/ \
--with-freetype-dir=/usr/ \
&& docker-php-ext-install gd
# install php required extentions
RUN docker-php-ext-install \
pdo \
pdo_mysql \
gettext \
mbstring
# Install git
# RUN apt-get install -y git
# clone the mibew messenger repository
# RUN git clone https://github.com/Mibew/mibew.git && cp -R mibew/src/mibew/* /var/www/html/
# TODO: install node and gulp to build from source
# Enviroment variables
ENV MIBEW_VERSION 3.3.1
ENV MIBEW_SHA1 e2c2c191232372439f980b0b1532d19dce54dc99
# change workdir to home
WORKDIR /~
# Download archive
RUN curl -o mibew.tar.gz -fSL "https://downloads.sourceforge.net/project/mibew/core/${MIBEW_VERSION}/mibew-${MIBEW_VERSION}.tar.gz" && \
# check if file exists, just to be safe
test -f "mibew.tar.gz" && \
# check sha1 sum
echo "$MIBEW_SHA1 *mibew.tar.gz" | sha1sum -c -&& \
# Extract files to apache root folder
tar -xzf mibew.tar.gz --strip 1 -C /var/www/html/ && \
# remove downloaded archive
rm mibew.tar.gz && \
# change permissions
chown -R www-data:www-data /var/www/html;
# create a volume for the config file
VOLUME /var/www/html/configs/config.yml