-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (23 loc) · 874 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
24
25
26
27
28
29
30
31
32
33
# Build rr binary
FROM spiralscout/roadrunner:latest as rr
# Clone the repository
FROM alpine/git as git
ARG REPOSITORY=https://github.com/metrixio/github-public.git
ARG BRANCH=master
RUN git clone -b $BRANCH $REPOSITORY /app
# Configure PHP project
FROM ghcr.io/metrixio/php81-alpine:latest
COPY --from=git /app /app
COPY --from=rr /usr/bin/rr /app
ARG APP_VERSION=v1.0
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
WORKDIR /app
RUN composer config --no-plugins allow-plugins.spiral/composer-publish-plugin false
RUN composer install --no-dev
EXPOSE 6001/tcp
EXPOSE 2112/tcp
LABEL org.opencontainers.image.source=$REPOSITORY
LABEL org.opencontainers.image.description="Github public metrics collector - metrix.io"
LABEL org.opencontainers.image.licenses=MIT
CMD ./rr serve