forked from PedroEscudero/search-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (39 loc) · 957 Bytes
/
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
FROM php:7.1-cli
WORKDIR /var/www
#
# Dependencies
#
RUN apt-get update \
&& apt-get install -y \
libzip-dev \
zip \
wget \
gnupg \
&& docker-php-ext-configure zip --with-libzip \
&& docker-php-ext-install zip bcmath
#
# Redis
#
RUN curl -L -o /tmp/redis.tar.gz https://github.com/phpredis/phpredis/archive/4.0.2.tar.gz \
&& tar xfz /tmp/redis.tar.gz \
&& rm -r /tmp/redis.tar.gz \
&& mkdir -p /usr/src/php/ext \
&& mv phpredis-4.0.2 /usr/src/php/ext/redis \
&& docker-php-ext-install redis
#
# Composer
#
RUN apt-get install -y curl \
&& curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/bin/composer
#
# Apisearch installation
#
RUN mkdir /var/www/apisearch
COPY . /var/www/apisearch
RUN cd /var/www/apisearch && \
composer install -n --prefer-dist && \
composer dump-autoload
COPY docker/* /
EXPOSE 8200
ENTRYPOINT ["/server-entrypoint.sh"]