@@ -3,9 +3,19 @@ ARG PHP_VERSION=8.3
3
3
4
4
FROM php:${PHP_VERSION}-cli-alpine
5
5
6
+ ARG PACKAGE_CONSTRAINT=9.5.x-dev
7
+
8
+ # https://github.com/opencontainers/image-spec/blob/main/annotations.md
9
+
10
+ LABEL org.opencontainers.image.title="overtrue/phplint"
11
+ LABEL org.opencontainers.image.description="Docker image of overtrue/phplint Composer package"
12
+ LABEL org.opencontainers.image.source="https://github.com/overtrue/phplint"
13
+ LABEL org.opencontainers.image.licenses="MIT"
14
+ LABEL org.opencontainers.image.authors="overtrue,llaville"
15
+
6
16
COPY entrypoint.sh /entrypoint.sh
7
- RUN chmod +x /entrypoint.sh
8
- RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
17
+ RUN chmod +x /entrypoint.sh \
18
+ && cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
9
19
10
20
# Default container directory where to mount your project source files
11
21
# GitLab uses $CI_PROJECT_DIR to identify where job runs on source files
@@ -18,10 +28,10 @@ RUN addgroup appgroup && adduser appuser -D -G appgroup
18
28
# Tell docker that all future commands should run as the appuser user
19
29
USER appuser
20
30
21
- # Install Composer v2 then overtrue/phplint package
31
+ # Install Composer v2 binary then package
22
32
COPY --from=composer/composer:2-bin /composer /usr/bin/composer
23
33
ENV COMPOSER_ALLOW_SUPERUSER 1
24
- RUN composer global require --no-progress overtrue/phplint 9.5.x-dev
34
+ RUN composer global require --no-progress overtrue/phplint $PACKAGE_CONSTRAINT
25
35
26
36
# Following recommendation at https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#workdir
27
37
0 commit comments