-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 781 Bytes
/
Dockerfile
File metadata and controls
35 lines (25 loc) · 781 Bytes
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
# Use the official PHP image
FROM php:8.2-cli
LABEL org.opencontainers.image.source="https://github.com/bjalt/byd-reader"
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
unzip \
libzip-dev \
&& docker-php-ext-install zip
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set environment variable for Composer
ENV COMPOSER_ALLOW_SUPERUSER=1
# Set working directory
WORKDIR /app
# Degine build arguments
ARG APP_ENV
# Set environment variables from build arguments
ENV APP_ENV=${APP_ENV}
# Copy project files
COPY . .
# Install PHP dependencies
RUN composer install --no-dev --optimize-autoloader
# Set the entry point to run the Symfony command
ENTRYPOINT ["php", "bin/console", "app:read"]