-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (37 loc) · 1.28 KB
/
Dockerfile
File metadata and controls
46 lines (37 loc) · 1.28 KB
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
FROM debian:testing-slim as build
RUN apt-get update && \
apt-get install -y autoconf \
build-essential \
git \
libpcre2-dev \
libncurses-dev \
libcap2-dev && \
rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/zsh-users/zsh.git /tmp/zsh
RUN cd /tmp/zsh && \
./Util/preconfig && \
./configure --prefix=/usr \
--enable-cap \
--enable-pcre \
--enable-multibyte \
--with-term-lib=ncursesw && \
make && \
make install.bin install.modules install.fns DESTDIR=/tmp/zsh-install
FROM debian:testing-slim
RUN apt-get update && \
apt-get install -y libpcre2-8-0 libncursesw6 libcap2 libtinfo6 make && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /tmp/zsh-install /
RUN groupadd czhttpd && \
useradd -m -g czhttpd -d /home/czhttpd -s /sbin/nologin czhttpd
USER czhttpd
ENV APP=/home/czhttpd/src
ENV PATH="$APP:$PATH"
RUN mkdir -p $APP/modules/ $APP/test/
COPY --chown=czhttpd:czhttpd modules/ $APP/modules/
COPY --chown=czhttpd:czhttpd test/ $APP/test/
COPY --chown=czhttpd:czhttpd czhttpd Makefile $APP/
RUN chmod +x $APP/czhttpd
WORKDIR $APP
RUN make clean
CMD ["czhttpd", "-v"]