forked from gabrielelana/precious
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 811 Bytes
/
Dockerfile
File metadata and controls
36 lines (26 loc) · 811 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
36
FROM php:8.4-cli
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
unzip \
libssl-dev \
libcurl4-openssl-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# Copy Composer from official image
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /app
# Copy composer files
COPY composer.json composer.lock* ./
# Required to allow autoload
RUN mkdir -p tests/data tests/PHPStan/Rule/data/ tests/PHPStan/Reflection/data/
# Install dependencies including dev dependencies for testing
RUN composer install
# Copy application code
COPY . .
# Includes autoload for classes under test
RUN composer dumpautoload
# Set environment variable for Composer
ENV COMPOSER_ALLOW_SUPERUSER=1
CMD ["tail", "-f", "/dev/null"]