Skip to content

Commit a94165b

Browse files
committed
Dockerfile embed deployAgent
1 parent b205f15 commit a94165b

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

infra/docker/Dockerfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM php:7.0-apache
2+
3+
# Set default system timezone
4+
RUN ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
5+
6+
# Install last update and php extension
7+
RUN apt-get update && apt-get install -y \
8+
git \
9+
vim \
10+
bzip2 \
11+
zip \
12+
libbz2-dev \
13+
libmcrypt-dev \
14+
libicu-dev \
15+
&& docker-php-ext-configure mysqli \
16+
&& docker-php-ext-install mysqli pdo_mysql bz2 mcrypt intl
17+
18+
# Install composer
19+
RUN curl -sS https://getcomposer.org/installer | php \
20+
&& mv composer.phar /usr/bin/composer
21+
22+
# Enable Apache Rewrite module
23+
RUN a2enmod rewrite
24+
25+
# Default Vhost for developement
26+
COPY infra/docker/vhost.conf /etc/apache2/sites-available/000-default.conf
27+
28+
# Implement application
29+
COPY . /var/app/
30+
31+
RUN rm -rf /var/app/.git
32+
RUN cd /var/app; \
33+
/usr/bin/composer update
34+
35+
CMD ["apache2-foreground"]

infra/docker/vhost.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<VirtualHost *>
2+
DocumentRoot /var/app/public
3+
<Directory /var/app/public>
4+
DirectoryIndex index.php
5+
AllowOverride All
6+
Require all granted
7+
</Directory>
8+
</VirtualHost>

0 commit comments

Comments
 (0)