mirror of
https://github.com/casjaysdevdocker/cherokee
synced 2025-09-18 15:57:44 -04:00
77 lines
1.8 KiB
Docker
77 lines
1.8 KiB
Docker
![]() |
# Cherokee Web Server built from stable release
|
||
|
FROM debian:bullseye as builder
|
||
|
|
||
|
# Install build dependencies including libtool
|
||
|
RUN apt-get update && apt-get install -y \
|
||
|
build-essential \
|
||
|
autoconf \
|
||
|
automake \
|
||
|
libtool \
|
||
|
pkg-config \
|
||
|
git \
|
||
|
gettext \
|
||
|
libssl-dev \
|
||
|
libpcre3-dev \
|
||
|
zlib1g-dev \
|
||
|
python2 \
|
||
|
python2-dev \
|
||
|
wget \
|
||
|
&& rm -rf /var/lib/apt/lists/*
|
||
|
|
||
|
# Download and build Cherokee from stable release
|
||
|
RUN cd /tmp && \
|
||
|
wget http://cherokee-project.com/download/1.2/1.2.103/cherokee-1.2.103.tar.gz && \
|
||
|
tar xzf cherokee-1.2.103.tar.gz && \
|
||
|
cd cherokee-1.2.103 && \
|
||
|
./configure \
|
||
|
--prefix=/usr \
|
||
|
--sysconfdir=/etc/cherokee \
|
||
|
--localstatedir=/var \
|
||
|
--disable-pam \
|
||
|
--with-wwwroot=/var/www/html && \
|
||
|
make && \
|
||
|
make install DESTDIR=/tmp/cherokee-install
|
||
|
|
||
|
# Final image
|
||
|
FROM alpine:latest
|
||
|
|
||
|
# Install runtime dependencies
|
||
|
RUN apk add --no-cache \
|
||
|
bash \
|
||
|
openssl \
|
||
|
pcre \
|
||
|
zlib \
|
||
|
gettext \
|
||
|
libgcc \
|
||
|
libstdc++
|
||
|
|
||
|
# Copy Cherokee from builder
|
||
|
COPY --from=builder /tmp/cherokee-install /
|
||
|
|
||
|
# Create directories
|
||
|
RUN mkdir -p /var/www/html /config /data /var/log/cherokee
|
||
|
|
||
|
# Create a simple index page
|
||
|
RUN echo "<h1>Cherokee Web Server</h1><p>Cherokee v1.2.103 is running!</p>" > /var/www/html/index.html
|
||
|
|
||
|
# Create basic Cherokee config
|
||
|
RUN mkdir -p /etc/cherokee && \
|
||
|
cat > /etc/cherokee/cherokee.conf << 'EOF'
|
||
|
server!port = 80
|
||
|
server!server_tokens = off
|
||
|
|
||
|
vserver!1!nick = default
|
||
|
vserver!1!document_root = /var/www/html
|
||
|
vserver!1!directory_index = index.html,index.htm
|
||
|
|
||
|
vserver!1!rule!1!match = default
|
||
|
vserver!1!rule!1!handler = file
|
||
|
|
||
|
mime!application/x-javascript!extensions = js
|
||
|
mime!text/css!extensions = css
|
||
|
mime!text/html!extensions = html,htm
|
||
|
EOF
|
||
|
|
||
|
EXPOSE 80
|
||
|
|
||
|
CMD ["/usr/sbin/cherokee", "-C", "/etc/cherokee/cherokee.conf"]
|