diff --git a/Dockerfile b/Dockerfile index df796ef..cb464de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,12 @@ FROM ubuntu:20.04 # Variables ENV CRAWL_REPO="https://github.com/crawl/crawl.git" \ - BUILD_DEPS="autoconf bison build-essential flex git libncursesw5-dev \ - libsqlite3-dev libz-dev pkg-config binutils-gold libsdl2-image-dev libsdl2-mixer-dev \ - libsdl2-dev libfreetype6-dev libpng-dev ttf-dejavu-core advancecomp pngcrush" \ APP_DEPS="bzip2 liblua5.1-0-dev python3-minimal python3-pip python3-yaml \ python-is-python3 ncurses-term locales-all sqlite3 libpcre3 locales \ lsof sudo libbot-basicbot-perl" \ + BUILD_DEPS="autoconf bison build-essential flex git libncursesw5-dev \ + libsqlite3-dev libz-dev pkg-config binutils-gold libsdl2-image-dev libsdl2-mixer-dev \ + libsdl2-dev libfreetype6-dev libpng-dev ttf-dejavu-core advancecomp pngcrush" \ DEBIAN_FRONTEND=noninteractive # Logic diff --git a/Dockerfile.webtiles b/Dockerfile.webtiles new file mode 100644 index 0000000..cb464de --- /dev/null +++ b/Dockerfile.webtiles @@ -0,0 +1,41 @@ +# Base image +FROM ubuntu:20.04 + +# Variables +ENV CRAWL_REPO="https://github.com/crawl/crawl.git" \ + APP_DEPS="bzip2 liblua5.1-0-dev python3-minimal python3-pip python3-yaml \ + python-is-python3 ncurses-term locales-all sqlite3 libpcre3 locales \ + lsof sudo libbot-basicbot-perl" \ + BUILD_DEPS="autoconf bison build-essential flex git libncursesw5-dev \ + libsqlite3-dev libz-dev pkg-config binutils-gold libsdl2-image-dev libsdl2-mixer-dev \ + libsdl2-dev libfreetype6-dev libpng-dev ttf-dejavu-core advancecomp pngcrush" \ + DEBIAN_FRONTEND=noninteractive + +# Logic +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y ${BUILD_DEPS} ${APP_DEPS} + +# Install Tornado +RUN pip3 install tornado + +# Retrieve crawl +RUN git clone ${CRAWL_REPO} /src/ + +# Build crawl +RUN cd /src/crawl-ref/source && \ + make -j4 USE_DGAMELAUNCH=y WEBTILES=y + +# Clean up unnecessary packages +RUN apt-get remove -y ${BUILD_DEPS} && \ + apt-get autoremove --purge -y && \ + rm -rf /var/lib/apt/lists/* + +# Expose ports +EXPOSE 8080 + +# Set the WORKDIR +WORKDIR /src/crawl-ref/source + +# Launch WebTiles server +CMD [ "./webserver/server.py" ] \ No newline at end of file diff --git a/README.md b/README.md index c8e3f5e..3707b25 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,23 @@ # docker-crawl -Docker container for Dungeon Crawl Stone Soup + +Docker container for Dungeon Crawl Stone Soup (DCSS). + +Docker Hub: [https://hub.docker.com/r/frozenfoxx/crawl](https://hub.docker.com/r/frozenfoxx/crawl) + +## How to Build + +``` +git clone git@github.com:frozenfoxx/docker-crawl.git +cd docker-crawl +docker build . +``` + +# How to Use this Image + +## Quickstart + +The following will run the latest Webtiles crawl server. + +``` +docker run -d --rm -p 8080:8080 --name=crawl_webtiles frozenfoxx/crawl:latest +``` \ No newline at end of file