-
-
Notifications
You must be signed in to change notification settings - Fork 118
/
Dockerfile
23 lines (16 loc) · 767 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
# syntax=docker/dockerfile:1.4
ARG PHP_VERSION=8.3
FROM php:${PHP_VERSION}-cli-alpine
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
# Create a group and user
RUN addgroup appgroup && adduser appuser -D -G appgroup
# Tell docker that all future commands should run as the appuser user
USER appuser
# Install Composer v2 then overtrue/phplint package
COPY --from=composer/composer:2-bin /composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER 1
RUN composer global require --no-progress overtrue/phplint 9.1.x-dev
# Following recommendation at https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#workdir
ENTRYPOINT ["/entrypoint.sh"]