forked from uspdev/impressoras
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
58 lines (49 loc) · 1.39 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM php:8.3-apache
# packages
RUN sed -i 's|main|main non-free|' /etc/apt/sources.list.d/debian.sources && apt-get update && apt-get install -y \
freetds-bin \
freetds-dev \
ghostscript \
icc-profiles \
libgs9-common \
poppler-utils \
texlive-extra-utils \
parallel \
pdftk \
libicu-dev \
libxml2-dev \
libzip-dev \
git \
zip \
unzip
# cleanup
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# php libs
RUN docker-php-ext-install \
intl \
pdo_dblib \
pdo_mysql \
soap \
zip
# php memory
ENV PHP_MEMORY_LIMIT 512M
ENV PHP_UPLOAD_LIMIT 512M
RUN { \
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
} > "${PHP_INI_DIR}/conf.d/upload.ini"
# laravel
COPY . .
RUN chown -R www-data: /var/www
RUN a2enmod rewrite
RUN sed -i 's|/var/www/html|/var/www/html/public|' /etc/apache2/sites-available/000-default.conf
USER www-data
RUN composer install --no-interaction --no-dev
CMD ["./serve.sh"]
# source:
# [1] https://www.digitalocean.com/community/tutorials/how-to-install-and-set-up-laravel-with-docker-compose-on-ubuntu-22-04
# [2] https://github.com/docker-library/php
# [3] https://github.com/nextcloud/docker/blob/master/29/fpm-alpine/Dockerfile