diff --git a/Dockerfile b/Dockerfile index 24b2545..8af2fc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM alpine AS builder -RUN apk --no-cache add build-base +RUN apk --no-cache add build-base m4 markdown COPY . /src RUN make -C /src DESTDIR=/tanks install FROM neale/eris -COPY builder:/opt/tanks /tanks -CMD [ "/opt/tanks/go.sh" ] +COPY --from=builder /tanks /tanks +CMD [ "/tanks/bin/go.sh" ] diff --git a/Makefile b/Makefile index 998b016..f3ed95d 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,8 @@ install: $(BINARIES) $(HTML) install -d $(DESTDIR)/www install upload.cgi $(DESTDIR)/www - install --mode=0644 $(HTML) $(DESTDIR)/www - install --mode=0644 $(WWW) $(DESTDIR)/www + install -m 0644 $(HTML) $(DESTDIR)/www + install -m 0644 $(WWW) $(DESTDIR)/www install -d $(DESTDIR)/examples cp -r examples $(DESTDIR)/examples diff --git a/go.sh b/go.sh index c07d62b..5fb5473 100644 --- a/go.sh +++ b/go.sh @@ -1,14 +1,14 @@ #! /bin/sh +cd $(dirname $0)/../www + ( - cd /tanks/www s6-tcpserver -u 80 -g 80 0.0.0.0 80 /usr/bin/eris -c -. ) & ( - cd /tanks while true; do - ./round.sh user/*/ + ../bin/round.sh */ sleep 60 done ) &