Dockerfile 1.16 KB
Newer Older
Romain De Laage De Bellefaye's avatar
Romain De Laage De Bellefaye committed
1
2
FROM alpine:3.13 AS downloader

3
ARG VERSION=v1.0.0-alpha.57
Romain De Laage De Bellefaye's avatar
Romain De Laage De Bellefaye committed
4
5

RUN apk add --no-cache curl jq && \
6
    curl -L $(curl https://code.podlibre.org/api/v4/projects/2/releases/${VERSION}/assets/links | jq -r .[].url | grep \.tar\.gz) -o castopod.tgz && \
7
    tar -xzf castopod.tgz
Romain De Laage De Bellefaye's avatar
Romain De Laage De Bellefaye committed
8
9
10

FROM php:7.4-fpm-alpine3.13

11
12
COPY entrypoint.sh /entrypoint.sh

roxane's avatar
roxane committed
13
14
COPY uploads.ini /usr/local/etc/php/conf.d/uploads.ini

15
16
RUN echo "* * * * * /usr/local/bin/php /castopod/public/index.php scheduled-activities" > /crontab.txt

17
18
19
20
21
22
RUN apk add --no-cache libpng icu-libs freetype libwebp libjpeg-turbo libxpm && \
    apk add --no-cache --virtual .php-ext-build-dep freetype-dev libpng-dev libjpeg-turbo-dev libwebp-dev zlib-dev libxpm-dev icu-dev && \
    docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp --with-xpm && \
    docker-php-ext-install gd intl mysqli && \
    docker-php-ext-enable mysqli gd intl && \
    apk del .php-ext-build-dep
Romain De Laage De Bellefaye's avatar
Romain De Laage De Bellefaye committed
23

24
COPY --from=downloader /castopod-host /castopod
25
26

RUN chmod 544 /entrypoint.sh && \
Romain De Laage De Bellefaye's avatar
Romain De Laage De Bellefaye committed
27
28
    chmod 444 /crontab.txt && \
    /usr/bin/crontab /crontab.txt
29
30
31
32
33
34
35
36

WORKDIR /castopod

VOLUME /castopod/public/media

ENTRYPOINT [ "sh", "-c" ]

CMD [ "/entrypoint.sh" ]