Holy smokes, a working docker image

This commit is contained in:
Neale Pickett 2018-08-08 14:08:04 +00:00
parent 55efb13cd4
commit e7324c30f5
3 changed files with 8 additions and 8 deletions

View File

@ -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" ]

View File

@ -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

6
go.sh
View File

@ -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
) &