This repository has been archived by the owner on Dec 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
80 lines (70 loc) · 1.84 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
FROM php:8-fpm-alpine3.13
LABEL maintainer "Thomas Ingvarsson <[email protected]>"
ARG TTRSS_VERSION
# Install php extensions and needed dependencies
RUN apk add --no-cache \
freetype \
icu \
libjpeg-turbo \
libpng \
libwebp \
libxpm \
postgresql \
rsync \
zlib \
&& apk add --no-cache --virtual=php-build-dependencies \
freetype-dev \
icu-dev \
libjpeg-turbo-dev \
libwebp-dev \
libxpm-dev \
postgresql-dev \
&& docker-php-ext-configure gd \
--enable-gd \
--with-freetype \
--with-jpeg \
--with-webp \
--with-xpm \
&& docker-php-ext-install \
gd \
intl \
opcache \
pcntl \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
&& mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& apk del php-build-dependencies
# Add TTRSS source to image
ENV SRC_DIR=/src/ttrss
ARG TTRSS_URL=https://git-gitea.tt-rss.org/fox/tt-rss/archive/$TTRSS_VERSION.tar.gz
RUN apk add --no-cache --virtual=build-dependencies \
tar \
wget \
&& mkdir -p $SRC_DIR \
&& wget -q -O- $TTRSS_URL | tar vxz -C $SRC_DIR --strip-components=1 \
&& apk del build-dependencies
# Prepare bootstrap and target directory for non-root users
ENV BOOTSTRAP_DIR=/bootstrap
ENV TTRSS_DIR=/ttrss
RUN mkdir -p $BOOTSTRAP_DIR $TTRSS_DIR \
&& chmod a+rwx $BOOTSTRAP_DIR $TTRSS_DIR
VOLUME $TTRSS_DIR
# Configuration options
# Used by start.sh and update.sh
ENV ENABLE_BOOTSTRAP=false \
SKIP_DB_CHECK=false
# TTRSS Configuration
ENV TTRSS_DB_TYPE="pgsql" \
TTRSS_DB_HOST="localhost" \
TTRSS_DB_PORT="5432" \
TTRSS_DB_USER="ttrss" \
TTRSS_DB_PASS="ttrssPass" \
TTRSS_DB_NAME="ttrss" \
TTRSS_SELF_URL_PATH="http://localhost" \
TTRSS_PHP_EXECUTABLE=/usr/local/bin/php
ADD init.sh /
ADD start.sh /
ADD update.sh /
CMD ["/start.sh"]