forked from laminas-api-tools/api-tools-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (35 loc) · 1.1 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
#
# Use this dockerfile to run api-tools.
#
# Start the server using docker-compose:
#
# docker-compose build
# docker-compose up
#
# You can install dependencies via the container:
#
# docker-compose run api-tools composer install
#
# You can manipulate dev mode from the container:
#
# docker-compose run api-tools composer development-enable
# docker-compose run api-tools composer development-disable
# docker-compose run api-tools composer development-status
#
# OR use plain old docker
#
# docker build -f Dockerfile-dev -t api-tools .
# docker run -it -p "8080:80" -v $PWD:/var/www api-tools
#
FROM php:7.3-apache
RUN apt-get update \
&& apt-get install -y git libzip-dev libicu-dev \
&& docker-php-ext-install zip \
&& docker-php-ext-install intl \
&& a2enmod rewrite \
&& sed -i 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/000-default.conf \
&& mv /var/www/html /var/www/public \
&& curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer \
&& echo "AllowEncodedSlashes On" >> /etc/apache2/apache2.conf
WORKDIR /var/www