1
- FROM lwthiker/curl-impersonate:0.5-ff-slim-buster AS curlimpersonate
2
-
3
1
FROM debian:12-slim AS rssbridge
4
2
5
3
LABEL description="RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one."
6
4
LABEL repository="https://github.com/RSS-Bridge/rss-bridge"
7
5
LABEL website="https://github.com/RSS-Bridge/rss-bridge"
8
6
9
7
ARG DEBIAN_FRONTEND=noninteractive
10
- RUN apt-get update && \
8
+ RUN set -xe && \
9
+ apt-get update && \
11
10
apt-get install --yes --no-install-recommends \
12
11
ca-certificates \
13
12
nginx \
@@ -24,18 +23,44 @@ RUN apt-get update && \
24
23
php-xml \
25
24
php-zip \
26
25
# php-zlib is enabled by default with PHP 8.2 in Debian 12
26
+ # for downloading libcurl-impersonate
27
+ curl \
27
28
&& \
29
+ # install curl-impersonate library
30
+ curlimpersonate_version=0.6.0 && \
31
+ { \
32
+ { \
33
+ [ $(arch) = 'aarch64' ] && \
34
+ archive="libcurl-impersonate-v${curlimpersonate_version}.aarch64-linux-gnu.tar.gz" && \
35
+ sha512sum="d04b1eabe71f3af06aa1ce99b39a49c5e1d33b636acedcd9fad163bc58156af5c3eb3f75aa706f335515791f7b9c7a6c40ffdfa47430796483ecef929abd905d" \
36
+ ; } \
37
+ || { \
38
+ [ $(arch) = 'armv7l' ] && \
39
+ archive="libcurl-impersonate-v${curlimpersonate_version}.arm-linux-gnueabihf.tar.gz" && \
40
+ sha512sum="05906b4efa1a6ed8f3b716fd83d476b6eea6bfc68e3dbc5212d65a2962dcaa7bd1f938c9096a7535252b11d1d08fb93adccc633585ff8cb8cec5e58bfe969bc9" \
41
+ ; } \
42
+ || { \
43
+ [ $(arch) = 'x86_64' ] && \
44
+ archive="libcurl-impersonate-v${curlimpersonate_version}.x86_64-linux-gnu.tar.gz" && \
45
+ sha512sum="480bbe9452cd9aff2c0daaaf91f1057b3a96385f79011628a9237223757a9b0d090c59cb5982dc54ea0d07191657299ea91ca170a25ced3d7d410fcdff130ace" \
46
+ ; } \
47
+ } && \
48
+ curl -LO "https://github.com/lwthiker/curl-impersonate/releases/download/v${curlimpersonate_version}/${archive}" && \
49
+ echo "$sha512sum $archive" | sha512sum -c - && \
50
+ mkdir -p /usr/local/lib/curl-impersonate && \
51
+ tar xaf "$archive" -C /usr/local/lib/curl-impersonate --wildcards 'libcurl-impersonate-ff.so*' && \
52
+ rm "$archive" && \
53
+ apt-get purge --assume-yes curl && \
28
54
rm -rf /var/lib/apt/lists/*
29
55
56
+ ENV LD_PRELOAD /usr/local/lib/curl-impersonate/libcurl-impersonate-ff.so
57
+ ENV CURL_IMPERSONATE ff91esr
58
+
30
59
# logs should go to stdout / stderr
31
60
RUN ln -sfT /dev/stderr /var/log/nginx/error.log; \
32
61
ln -sfT /dev/stdout /var/log/nginx/access.log; \
33
62
chown -R --no-dereference www-data:adm /var/log/nginx/
34
63
35
- COPY --from=curlimpersonate /usr/local/lib/libcurl-impersonate-ff.so /usr/local/lib/curl-impersonate/
36
- ENV LD_PRELOAD /usr/local/lib/curl-impersonate/libcurl-impersonate-ff.so
37
- ENV CURL_IMPERSONATE ff91esr
38
-
39
64
COPY ./config/nginx.conf /etc/nginx/sites-available/default
40
65
COPY ./config/php-fpm.conf /etc/php/8.2/fpm/pool.d/rss-bridge.conf
41
66
COPY ./config/php.ini /etc/php/8.2/fpm/conf.d/90-rss-bridge.ini
0 commit comments