-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (34 loc) · 1.37 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
FROM composer:2.7.7 as composer
FROM php:8.3.0-alpine3.17 as build
COPY --from=composer /usr/bin/composer /usr/bin/composer
WORKDIR /app/
COPY app/ /app/
RUN chmod a+rx /usr/bin/composer && /usr/bin/composer install --no-interaction --no-scripts --no-progress --optimize-autoloader
FROM pipelinecomponents/base-entrypoint:0.5.0 as entrypoint
FROM php:8.3.0-alpine3.17
COPY --from=entrypoint /entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
ENV DEFAULTCMD dep
ENV PATH "$PATH:/app/vendor/bin/"
COPY ssh-config /root/.ssh/config
# hadolint ignore=DL3018
RUN \
chmod u=r,go= /root/.ssh/config && \
apk --no-cache add bash rsync openssh-client git
COPY --from=build /app/ /app/
WORKDIR /code/
# Build arguments
ARG BUILD_DATE
ARG BUILD_REF
# Labels
LABEL \
maintainer="Robbert Müller <[email protected]>" \
org.label-schema.description="Deployer.org in a container for gitlab-ci" \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="Deployer" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://pipeline-components.gitlab.io/" \
org.label-schema.usage="https://gitlab.com/pipeline-components/deployer/blob/master/README.md" \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-url="https://gitlab.com/pipeline-components/deployer/" \
org.label-schema.vendor="Pipeline Components"