-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
56 lines (50 loc) · 2.7 KB
/
Dockerfile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# ==============================================================================
# Add https://gitlab.com/pipeline-components/org/base-entrypoint
# ------------------------------------------------------------------------------
FROM pipelinecomponents/base-entrypoint:0.5.0 as entrypoint
# ==============================================================================
# Component specific
# ------------------------------------------------------------------------------
FROM composer:2.8.8 as build
COPY app/ /app/
WORKDIR /app/
RUN composer install --no-interaction --no-scripts --no-progress --optimize-autoloader
# ------------------------------------------------------------------------------
FROM php:8.3.20-alpine3.21
ENV PATH "$PATH:/app/vendor/bin/"
COPY --from=build /app/ /app/
# COPY php.ini /usr/local/etc/php/php.ini
# ==============================================================================
# Generic for all components
# ------------------------------------------------------------------------------
COPY --from=entrypoint /entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
ENV DEFAULTCMD php-cs-fixer
WORKDIR /code/
# ==============================================================================
# Container meta information
# ------------------------------------------------------------------------------
ARG BUILD_DATE
ARG BUILD_REF
LABEL \
maintainer="Robbert Müller <[email protected]>" \
org.opencontainers.image.title="PHP Coding Standards Fixer" \
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
org.opencontainers.image.vendor="Pipeline Components" \
org.opencontainers.image.authors="Robbert Müller <[email protected]>" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.url="https://pipeline-components.dev/" \
org.opencontainers.image.source="https://gitlab.com/pipeline-components/php-cs-fixer/" \
org.opencontainers.image.documentation="https://gitlab.com/pipeline-components/php-cs-fixer/blob/main/README.md" \
org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.revision=${BUILD_REF} \
org.opencontainers.image.version=${BUILD_VERSION} \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.description="PHP-CS-Fixer in a container for gitlab-ci" \
org.label-schema.name="PHP Coding Standards Fixer" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://pipeline-components.dev/" \
org.label-schema.usage="https://gitlab.com/pipeline-components/php-cs-fixer/blob/main/README.md" \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-url="https://gitlab.com/pipeline-components/php-cs-fixer/" \
org.label-schema.vendor="Pipeline Components"