-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
30 lines (25 loc) · 1.13 KB
/
Dockerfile
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
FROM debian:buster-slim as builder1
RUN apt-get update && \
apt-get install -y gcc make libc6-dbg
COPY mayhemit-c/mayhemit.c .
# compile with coverage
RUN gcc -g mayhemit.c -o /mayhemit
FROM debian:10-slim as builder2
RUN apt-get update && apt-get install -y build-essential wget libc6-dbg autoconf automake libtool pkg-config
WORKDIR /build
# Note: it's important that the docker image path is similar to Github path for codecov to find the right files
COPY lighttpd/lighttpd-source /build/lighttpd/lighttpd-source
RUN cd /build/lighttpd/lighttpd-source \
&& ./autogen.sh \
&& CFLAGS=-g ./configure --without-bzip2 --without-pcre --without-zlib --build=x86_64-unknown-linux-gnu \
&& CFLAGS=-g make \
&& CFLAGS=-g make install
COPY lighttpd/lighttpd.conf /usr/local/etc
FROM debian:10-slim
RUN apt-get update && apt-get install -y --no-install-recommends libc6-dbg
COPY mayhem/testsuite /testsuite
COPY --from=builder1 /mayhemit /mayhemit
COPY --from=builder2 /usr/local /usr/local
RUN mkdir /www && echo "lighttpd 1.4.52 running!" > /www/index.html
CMD ["/usr/local/sbin/lighttpd","-D", "-f","/usr/local/etc/lighttpd.conf"]
EXPOSE 80