34 lines
599 B
Docker
34 lines
599 B
Docker
|
FROM alpine:edge as builder
|
||
|
|
||
|
RUN apk --no-cache add cmake \
|
||
|
clang \
|
||
|
clang-dev \
|
||
|
make \
|
||
|
gcc \
|
||
|
g++ \
|
||
|
libc-dev \
|
||
|
linux-headers \
|
||
|
zlib-dev \
|
||
|
git
|
||
|
|
||
|
RUN \
|
||
|
git clone git://github.com/lpereira/lwan && \
|
||
|
cd lwan && \
|
||
|
mkdir build && \
|
||
|
cd build && \
|
||
|
cmake .. -DCMAKE_BUILD_TYPE=Release && \
|
||
|
make && \
|
||
|
pwd
|
||
|
|
||
|
FROM alpine:edge
|
||
|
|
||
|
COPY --from=builder /lwan/build/src/bin/lwan/ /opt/lwan
|
||
|
COPY lwan/lwan.conf /opt/lwan
|
||
|
|
||
|
WORKDIR /opt/lwan
|
||
|
EXPOSE 80 443 8080
|
||
|
VOLUME ["/opt/lwan", "/opt/lwan/wwwroot"]
|
||
|
|
||
|
ENTRYPOINT ["/opt/lwan/lwan"]
|
||
|
|