varnish add
This commit is contained in:
32
deploy/varnish/Dockerfile
Normal file
32
deploy/varnish/Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
FROM debian:trixie-slim
|
||||
|
||||
ARG VARNISH_VERSION=8.0.0
|
||||
ARG VARNISH_MODULES_VERSION=0.27.0
|
||||
|
||||
# potrzebne narzędzia do kompilacji
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl build-essential automake autoconf libtool pkg-config python3-sphinx \
|
||||
git ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# instalacja varnish
|
||||
RUN curl -fsSL https://varnish-cache.org/_downloads/varnish-${VARNISH_VERSION}.tgz -o varnish.tar.gz \
|
||||
&& tar xzf varnish.tar.gz \
|
||||
&& cd varnish-${VARNISH_VERSION} \
|
||||
&& ./configure && make -j$(nproc) && make install \
|
||||
&& cd .. && rm -rf varnish-${VARNISH_VERSION} varnish.tar.gz
|
||||
|
||||
# instalacja varnish-modules (w tym vsthrottle)
|
||||
RUN curl -fsSL https://github.com/varnish/varnish-modules/releases/download/${VARNISH_MODULES_VERSION}/varnish-modules-${VARNISH_MODULES_VERSION}.tar.gz -o modules.tar.gz \
|
||||
&& tar xzf modules.tar.gz \
|
||||
&& cd varnish-modules-${VARNISH_MODULES_VERSION} \
|
||||
&& ./configure && make -j$(nproc) && make install \
|
||||
&& cd .. && rm -rf varnish-modules-${VARNISH_MODULES_VERSION} modules.tar.gz
|
||||
|
||||
# katalog na konfigurację
|
||||
WORKDIR /etc/varnish
|
||||
COPY default.vcl /etc/varnish/
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["varnishd", "-F", "-f", "/etc/varnish/default.vcl", "-s", "malloc,256m"]
|
Reference in New Issue
Block a user