Mitigate PHP vulnerability while lolcat is fat and lazy and doesnt updoot docker image #99

Closed
opened 2026-10-21 17:48:24 -04:00 by PointeR · 1 comment
FROM lwthiker/curl-impersonate:0.6.1-ff-alpine AS curl-impersonate

FROM alpine:edge
WORKDIR /var/www/html/4get

RUN apk update && apk upgrade
RUN apk add php apache2-ssl php84-fileinfo php84-openssl php84-iconv php84-common php84-dom php84-sodium php84-curl curl php84-pecl-apcu php84-apache2 imagemagick php84-pecl-imagick php84-mbstring imagemagick-webp imagemagick-jpeg nss ca-certificates ghostscript-fonts git

COPY --from=curl-impersonate /usr/local/bin /usr/local/bin
COPY --from=curl-impersonate /usr/local/lib /usr/local/lib

ENV LD_PRELOAD=/usr/local/lib/libcurl-impersonate-ff.so
ENV CURL_IMPERSONATE=ff117
ENV CURL_IMPERSONATE_HEADERS=no

RUN git clone http://git.lolcat.ca/lolcat/4get.git .

RUN chmod 777 /var/www/html/4get/icons

EXPOSE 80
EXPOSE 443

ENV FOURGET_PROTO=http

ENTRYPOINT  ["./docker/docker-entrypoint.sh"]
CMD ["start"]

For self hosters that just want a drop in replacement of the Docker file, using this you will get the freshest PHP which has the security patches in place :)

``` FROM lwthiker/curl-impersonate:0.6.1-ff-alpine AS curl-impersonate FROM alpine:edge WORKDIR /var/www/html/4get RUN apk update && apk upgrade RUN apk add php apache2-ssl php84-fileinfo php84-openssl php84-iconv php84-common php84-dom php84-sodium php84-curl curl php84-pecl-apcu php84-apache2 imagemagick php84-pecl-imagick php84-mbstring imagemagick-webp imagemagick-jpeg nss ca-certificates ghostscript-fonts git COPY --from=curl-impersonate /usr/local/bin /usr/local/bin COPY --from=curl-impersonate /usr/local/lib /usr/local/lib ENV LD_PRELOAD=/usr/local/lib/libcurl-impersonate-ff.so ENV CURL_IMPERSONATE=ff117 ENV CURL_IMPERSONATE_HEADERS=no RUN git clone http://git.lolcat.ca/lolcat/4get.git . RUN chmod 777 /var/www/html/4get/icons EXPOSE 80 EXPOSE 443 ENV FOURGET_PROTO=http ENTRYPOINT ["./docker/docker-entrypoint.sh"] CMD ["start"] ``` For self hosters that just want a drop in replacement of the Docker file, using this you will get the freshest PHP which has the security patches in place :)
Owner

fixed in commit 6c882ae245

fixed in commit 6c882ae245380b5e812d5ef446f78f155839759b
Sign in to join this conversation.
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lolcat/4get#99