-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
24 lines (21 loc) · 840 Bytes
/
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
FROM alpine AS build
RUN mkdir /code
RUN apk --no-cache add git build-base sed
WORKDIR /code
RUN git clone https://git.suckless.org/quark ./
# Add javascript mime type
RUN sed -i 's/} mimes\[\] = {/&\n { "js", "application\/javascript; charset=utf-8" },/' config.def.h
RUN make
RUN make install all
FROM alpine
ENV PORT=8080
RUN mkdir /quark
WORKDIR /quark
COPY --from=build /code /quark
RUN mkdir /html
VOLUME ["/html"]
EXPOSE $PORT
RUN ln -s /quark/quark /usr/bin/quark
# CMD ["quark", '-h', '0.0.0.0', '-p', '80', '-d', '/html']
CMD quark -h 0.0.0.0 -p $PORT -d /html
# docker run --expose 8081 -e PORT=8081 -p 8080:8081 -v /tmp/html:/html vasaulys/quark