forked from SSICLOPS/quant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (23 loc) · 939 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 ntap/warpcore:dev
RUN echo "@edge http://dl-cdn.alpinelinux.org/alpine/edge/main" \
>> /etc/apk/repositories
RUN apk add --no-cache cmake@edge ninja gcc g++ git musl-dev linux-headers \
libbsd-dev mercurial openssl \
openssl-dev http-parser-dev libev-dev libbsd-dev
RUN git config --global user.email "[email protected]"
ADD . /src
WORKDIR /src/Debug
RUN cmake -GNinja -DNO_SANITIZERS=True -DCMAKE_INSTALL_PREFIX=/dst ..
RUN ninja install
ADD https://github.com/gabrielecirulli/2048/archive/master.zip /www
WORKDIR /tls
RUN openssl req -batch -new -newkey rsa:2048 -sha256 -days 9365 -nodes -x509 \
-keyout quant.key -out quant.crt
FROM alpine:3.6
COPY --from=0 /dst /
COPY --from=0 /www /www
COPY --from=0 /tls /tls
RUN apk add --no-cache libcrypto1.0 http-parser libev libbsd
EXPOSE 4433/UDP
CMD ["/bin/server", "-i", "eth0", "-d", "/www", \
"-c", "/tls/quant.crt", "-k", "/tls/quant.key"]