-
Notifications
You must be signed in to change notification settings - Fork 42
/
Dockerfile
34 lines (25 loc) · 904 Bytes
/
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
# docker buildx build --pull --push --platform linux/amd64 -t docker.io/samber/invoice-as-a-service:2024-06-07 .
FROM php:8.0-fpm
WORKDIR .
# Install system dependencies
RUN apt-get update \
&& apt-get install -y \
zip \
unzip \
curl \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install GD extension
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd
# Install Composer using the official installation script
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Copy application files
COPY . .
# Install application dependencies
RUN COMPOSER_ALLOW_SUPERUSER=1 composer install
EXPOSE 8000
CMD ["php", "artisan", "serve", "--host", "0.0.0.0", "--port", "8000"]