mirror of https://github.com/dirtbags/tanks.git
Start trying to dockerize
This commit is contained in:
parent
018488070f
commit
55951b7a55
|
@ -0,0 +1,9 @@
|
||||||
|
FROM alpine AS builder
|
||||||
|
|
||||||
|
RUN apk --no-cache add build-base
|
||||||
|
COPY . /src
|
||||||
|
RUN make -C /src DESTDIR=/tanks install
|
||||||
|
|
||||||
|
FROM neale/eris
|
||||||
|
COPY builder:/opt/tanks /tanks
|
||||||
|
CMD [ "/opt/tanks/go.sh" ]
|
21
Makefile
21
Makefile
|
@ -4,18 +4,23 @@ WWW = style.css grunge.png designer.js figures.js tanks.js nav.html.inc jstanks.
|
||||||
|
|
||||||
CFLAGS = -Wall
|
CFLAGS = -Wall
|
||||||
|
|
||||||
|
DESTDIR = /opt/tanks
|
||||||
|
|
||||||
all: $(BINARIES) $(HTML)
|
all: $(BINARIES) $(HTML)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -d $(DESTDIR)/usr/bin
|
install -d $(DESTDIR)/bin
|
||||||
install run-tanks $(DESTDIR)/usr/bin
|
install go.sh $(DESTDIR)/bin
|
||||||
install forftanks $(DESTDIR)/usr/bin
|
install round.sh $(DESTDIR)/bin
|
||||||
|
install forftanks $(DESTDIR)/bin
|
||||||
|
|
||||||
install -d $(DESTDIR)/usr/lib/tanks
|
install -d $(DESTDIR)/www
|
||||||
install designer.cgi $(DESTDIR)/usr/lib/tanks
|
install designer.cgi $(DESTDIR)/www
|
||||||
install $(HTML) $(DESTDIR)/usr/lib/tanks
|
install $(HTML) $(DESTDIR)/www
|
||||||
install $(WWW) $(DESTDIR)/usr/lib/tanks
|
install $(WWW) $(DESTDIR)/www
|
||||||
cp -r examples $(DESTDIR)/usr/lib/tanks/examples
|
|
||||||
|
install -d $(DESTDIR)/examples
|
||||||
|
cp -r examples $(DESTDIR)/examples
|
||||||
|
|
||||||
forftanks: forftanks.o ctanks.o forf.o
|
forftanks: forftanks.o ctanks.o forf.o
|
||||||
forftanks: LDLIBS = -lm
|
forftanks: LDLIBS = -lm
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
(
|
||||||
|
cd /tanks/www
|
||||||
|
s6-tcpserver -u 80 -g 80 0.0.0.0 80 /usr/bin/eris -c -.
|
||||||
|
) &
|
||||||
|
|
||||||
|
(
|
||||||
|
cd
|
Loading…
Reference in New Issue