Contain the kore.

Add a top level Dockerfile, not really useful for anything besides
hacking on kore. See `make contain`;

Add docker top level directory, it contains an `app` container,
with a `kore run` ENTRYPOINT, an example of using that image is

   FROM kore/app

   COPY . myapp
   CMD ["myapp"]

There is also a `build` image, which is the base for both aforementioned
containers.
This commit is contained in:
Thordur Bjornsson 2015-05-16 13:31:19 +02:00
parent ff2574899d
commit 9c2e902b81
6 changed files with 44 additions and 1 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
.git

5
Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM kore/build
WORKDIR /kore
VOLUME ["/kore"]
EXPOSE 443 8888

View File

@ -77,4 +77,8 @@ clean:
find . -type f -name \*.o -exec rm {} \;
rm -f $(KORE)
.PHONY: clean
contain:
docker build -t kore .
docker run -itP --name kore --rm -v ${PWD}/:/kore kore
.PHONY: clean contain

14
docker/Makefile Normal file
View File

@ -0,0 +1,14 @@
all: build app
build:
docker build -t kore-build -f build/Dockerfile build/
docker tag kore-build kore/build
app:
docker build -t kore-app -f app/Dockerfile app/
docker tag kore-app kore/app
clean:
docker rmi -f kore-build kore-app
.PHONY: all build app clean

14
docker/app/Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM kore/build
MAINTAINER Thordur I. Bjornsson <thorduri@secnorth.net>
ENV KORE_VERSION 1.2.2
WORKDIR /kore
ADD https://github.com/jorisvink/kore/archive/$KORE_VERSION-release.tar.gz /kore/
RUN tar -zxf $KORE_VERSION-release.tar.gz && cd kore-$KORE_VERSION-release/ && \
make clean && make && make install && \
rm -rf /kore/$KORE_VERSION-release.tar.gz /kore/kore-$KORE_VERSION-release
EXPOSE 443 8888
ENTRYPOINT ["kore", "run"]

5
docker/build/Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM debian:jessie
MAINTAINER Thordur I. Bjornsson <thorduri@secnorth.net>
RUN apt-get update -qq && \
apt-get -qqy install build-essential clang git libpq-dev libssl-dev libz-dev