From 35ae6d82c3b1cf749f877f16d4ae57991b523614 Mon Sep 17 00:00:00 2001 From: Dan Feeney Date: Wed, 14 Dec 2016 19:21:59 -0600 Subject: [PATCH] added comments to dockerfiles --- Dockerfile | 20 +++++++++++++++++++- evennia/game_template/Dockerfile | 4 ++++ evennia/game_template/docker-compose.yml | 2 ++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a9fdb97ba0..ebe4c6797c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,28 @@ FROM python:2.7-alpine MAINTAINER Dan Feeney "feend78@gmail.com" + +# install compilation environment RUN apk update && apk add gcc musl-dev + +# add the project source ADD . /usr/src/evennia + +# install dependencies RUN pip install -e /usr/src/evennia + +# add the game source during game builds ONBUILD ADD . /usr/src/game + +# make the game source hierarchy persistent with a named volume. +# during development this is typically superceded by directives in +# docker-compose.yml or the CLI to mount a local directory. VOLUME /usr/src/game + +# set the working directory WORKDIR /usr/src/game -CMD ["evennia", "-l", "-i", "start"] + +# startup command +CMD ["evennia", "-i", "start"] + +# expose the default ports EXPOSE 8000 8001 4000 diff --git a/evennia/game_template/Dockerfile b/evennia/game_template/Dockerfile index 44bba7ffd2..aad71d5988 100644 --- a/evennia/game_template/Dockerfile +++ b/evennia/game_template/Dockerfile @@ -1 +1,5 @@ FROM evennia/evennia:latest +# MAINTAINER you@example.com + +# this is all we need. +# the ONBUILD directive in the evennia/evenia image does most of the work for us. diff --git a/evennia/game_template/docker-compose.yml b/evennia/game_template/docker-compose.yml index 7eff3deaa4..ddb7ea2097 100644 --- a/evennia/game_template/docker-compose.yml +++ b/evennia/game_template/docker-compose.yml @@ -1,8 +1,10 @@ version: '2' services: + # optionally change service id 'mygame' below to match your game (no spaces) mygame: build: . + # change 'myuser/mygame' below to a valid docker hub repository tag image: myuser/mygame stdin_open: true tty: true