-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
64 lines (49 loc) · 1.63 KB
/
Dockerfile
File metadata and controls
64 lines (49 loc) · 1.63 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
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM php:8.3-apache
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
unixodbc \
unixodbc-dev \
freetds-dev \
freetds-bin \
tdsodbc \
libsybdb5 \
unzip \
git \
curl \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libzip-dev \
libonig-dev \
libxml2-dev \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install \
pdo_mysql \
pdo_dblib \
gd \
mbstring \
zip \
xml \
bcmath \
pcntl \
opcache
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN echo "[FreeTDS]" >> /etc/odbcinst.ini \
&& echo "Description = FreeTDS Driver" >> /etc/odbcinst.ini \
&& echo "Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so" >> /etc/odbcinst.ini \
&& echo "Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so" >> /etc/odbcinst.ini
RUN a2enmod rewrite
COPY dokku-deploy/apache-php.conf /etc/apache2/conf-available/
RUN a2enconf apache-php
RUN sed -ri -e 's!/var/www/html!/var/www/html/public!g' /etc/apache2/sites-available/*.conf \
&& sed -ri -e 's!/var/www/!/var/www/html/public!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
WORKDIR /var/www/html
COPY composer.json composer.lock ./
RUN composer install --no-dev --optimize-autoloader --no-interaction --no-scripts
COPY . .
RUN mkdir -p storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache \
&& chown -R www-data:www-data storage bootstrap/cache \
&& chmod -R 775 storage bootstrap/cache
EXPOSE 80
CMD ["apache2-foreground"]