-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
51 lines (38 loc) · 1.21 KB
/
dockerfile
File metadata and controls
51 lines (38 loc) · 1.21 KB
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
49
50
51
FROM php:7.1-apache
# FROM apache-php-laravel
LABEL maintainer=staxx@gmail.com
# WORKDIR /var/www/html
# COPY src/ .
# Copy application source
COPY src/ /var/www/html/
COPY .env /var/www/html/src/.env
RUN chown -R www-data:www-data /var/www/html/src
ENV DB_HOST=172.17.0.2
ENV DB_DATABASE=homestead
ENV DB_USERNAME=homestead
ENV DB_PASSWORD=securepass
RUN apt-get update && apt-get install -y \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libzip-dev \
zlib1g-dev \
unzip \
zip \
git
RUN docker-php-ext-install gd pdo pdo_mysql
RUN docker-php-ext-configure gd \
--with-freetype \
--with-jpeg
RUN docker-php-ext-install gd pdo pdo_mysql
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer install
RUN php artisan migrate
RUN php artisan db:seed
RUN php artisan key:generate
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
COPY apache-config.conf /etc/apache2/sites-available/000-default.conf
COPY start-apache /usr/local/bin/start-apache
RUN chmod +x /usr/local/bin/start-apache
RUN a2enmod rewrite
ENTRYPOINT ["/usr/local/bin/start-apache"]