2 коммитов

Автор SHA1 Сообщение Дата
  Soekarmana 512c19147c fix Dockerfile indentation and enabling rewrite mod 6 лет назад
  Soekarmana 1653d2fb1a add new apache config file for laravel 6 лет назад
2 измененных файлов: 53 добавлений и 13 удалений
  1. +14
    -13
      Dockerfile
  2. +39
    -0
      apache-laravel.conf

+ 14
- 13
Dockerfile Просмотреть файл

@ -1,27 +1,28 @@
FROM php:7.2-apache as builder
RUN echo 'Acquire::HTTP::Proxy "http://172.17.0.1:3142";' >> /etc/apt/apt.conf.d/01proxy \
&& apt-get update
&& apt-get update
RUN apt-get install -y curl gnupg2 apt-transport-https ca-certificates \
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/9/prod.list \
> /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/9/prod.list \
> /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update
RUN ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools unixodbc-dev \
&& pecl install sqlsrv pdo_sqlsrv
&& pecl install sqlsrv pdo_sqlsrv
FROM php:7.2-apache
RUN echo 'Acquire::HTTP::Proxy "http://172.17.0.1:3142";' >> /etc/apt/apt.conf.d/01proxy \
&& apt-get update
&& apt-get update
RUN apt-get install -y curl gnupg2 apt-transport-https ca-certificates \
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/9/prod.list \
> /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update \
&& ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/9/prod.list \
> /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update \
&& ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools
RUN apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen
&& locale-gen \
&& a2enmod rewrite
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/etc/ /usr/local/etc/
COPY --from=builder /usr/local/lib/ /usr/local/lib/

+ 39
- 0
apache-laravel.conf Просмотреть файл

@ -0,0 +1,39 @@
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/public
<Directory /var/www/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /var/www>
AllowOverride All
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

Загрузка…
Отмена
Сохранить