Skip to content

Commit 45f80e6

Browse files
committed
1 parent 584063a commit 45f80e6

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@ ARG PHP_VERSION=8.3
33

44
FROM php:${PHP_VERSION}-cli-alpine
55

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+
616
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
919

1020
# Default container directory where to mount your project source files
1121
# 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
1828
# Tell docker that all future commands should run as the appuser user
1929
USER appuser
2030

21-
# Install Composer v2 then overtrue/phplint package
31+
# Install Composer v2 binary then package
2232
COPY --from=composer/composer:2-bin /composer /usr/bin/composer
2333
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
2535

2636
# Following recommendation at https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#workdir
2737

0 commit comments

Comments
 (0)