docker-ttrss/Dockerfile

60 lines
2.3 KiB
Docker
Raw Normal View History

2017-07-07 13:15:30 +02:00
# Using https://github.com/gliderlabs/docker-alpine,
# plus https://github.com/just-containers/s6-overlay for a s6 Docker overlay.
2025-01-05 10:17:04 -05:00
FROM alpine:3.21
2017-07-07 13:15:30 +02:00
# Initially was based on work of Christian Lück <christian@lueck.tv>.
LABEL description="A complete, self-hosted Tiny Tiny RSS (TTRSS) environment." \
2025-01-06 17:21:16 -05:00
maintainer="Andreas Löffler <andy@x86dev.com>"
2014-04-26 17:24:57 +02:00
RUN set -xe && \
apk update && apk upgrade && \
apk add --no-cache --virtual=run-deps \
2023-06-13 16:22:04 -04:00
s6 s6-linux-init s6-overlay \
2018-12-16 14:18:23 +01:00
busybox nginx git ca-certificates curl \
2025-01-05 10:17:04 -05:00
php83 php83-fpm php83-curl php83-dom php83-gd php83-iconv php83-fileinfo php83-json \
php83-pecl-mcrypt php83-pgsql php83-pcntl php83-pdo php83-pdo_pgsql \
php83-mysqli php83-pdo_mysql \
php83-mbstring php83-posix php83-session php83-intl
2014-04-26 17:24:57 +02:00
2017-07-07 13:15:30 +02:00
# Add user www-data for php-fpm.
# 82 is the standard uid/gid for "www-data" in Alpine.
RUN adduser -u 82 -D -S -G www-data www-data
2014-04-26 17:24:57 +02:00
2017-07-07 13:15:30 +02:00
# Copy root file system.
COPY root /
2015-12-07 22:23:09 +01:00
2017-07-07 13:15:30 +02:00
# Add s6 overlay.
# Note: Tweak this line if you're running anything other than x86 AMD64 (64-bit).
2025-01-05 10:17:04 -05:00
RUN curl --connect-timeout 30 -L -s https://github.com/just-containers/s6-overlay/releases/download/v3.1.3.0/s6-overlay-x86_64.tar.xz -o s6-overlay-x86_64.tar.xz && \
2023-06-12 16:57:23 -04:00
tar xvf s6-overlay-x86_64.tar.xz -C / && \
rm s6-overlay-x86_64.tar.xz
# Add wait-for-it.sh
ADD https://raw.githubusercontent.com/Eficode/wait-for/master/wait-for /srv
RUN chmod 755 /srv/wait-for
2017-07-07 13:15:30 +02:00
# Expose Nginx ports.
EXPOSE 8080
EXPOSE 4443
2014-04-26 17:24:57 +02:00
2017-07-07 13:15:30 +02:00
# Expose default database credentials via ENV in order to ease overwriting.
2025-01-05 10:17:04 -05:00
ENV DB_NAME=ttrss
ENV DB_USER=ttrss
ENV DB_PASS=ttrss
2014-04-26 17:24:57 +02:00
2017-07-07 13:15:30 +02:00
# Clean up.
RUN set -xe && apk del --progress --purge && rm -rf /var/cache/apk/* && rm -rf /var/lib/apt/lists/*
2017-03-26 21:53:03 +02:00
2025-01-06 17:21:16 -05:00
RUN chown -R www-data:www-data /var/www
USER www-data
RUN git clone "https://git.tt-rss.org/fox/tt-rss.git/" "/var/www/ttrss" && \
git clone --depth=1 https://github.com/sepich/tt-rss-mobilize.git /var/www/ttrss/plugins.local/mobilize && \
git clone --depth=1 https://github.com/feediron/ttrss_plugin-feediron.git /var/www/ttrss/plugins.local/feediron && \
git clone --depth=1 https://github.com/levito/tt-rss-feedly-theme.git /var/www/ttrss/themes.local/levito-feedly-git && \
git clone --depth=1 https://github.com/Gravemind/tt-rss-feedlish-theme.git /var/www/ttrss/themes.local/gravemind-feedly-git
USER root
2017-03-26 21:53:03 +02:00
ENTRYPOINT ["/init"]