Start trying to dockerize

This commit is contained in:
Neale Pickett 2018-08-07 18:21:52 +00:00
parent 018488070f
commit 55951b7a55
4 changed files with 31 additions and 8 deletions

9
Dockerfile Normal file
View File

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

View File

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

9
go.sh Normal file
View File

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

View File