瀏覽代碼

first commit

root 6 年之前
當前提交
587b7da64b
共有 3 個文件被更改,包括 44 次插入0 次删除
  1. 32 0
      dockerfile
  2. 2 0
      run-container.sh
  3. 10 0
      run_tilemill.sh

+ 32 - 0
dockerfile

@@ -0,0 +1,32 @@
+FROM ubuntu:18.04 
+MAINTAINER juca <juca@juan-carlos.info>
+
+ENV APP_NAME="tilemill"
+
+RUN     export DEBIAN_FRONTEND=noninteractive \
+    &&  apt-get update -y \
+    &&  apt-get install -y --no-install-recommends apt-utils   \
+    &&  apt-get install -y locales && locale-gen en_US.UTF-8   \
+    &&  apt-get install -y curl \
+    &&  curl -sL https://deb.nodesource.com/setup_8.x | bash - \
+    &&  apt-get update -y                        \
+    &&  apt-get install -y nodejs git            \
+    &&  mkdir /opt/tilemill /root/Documents      \
+    &&  cd /opt/tilemill                         \
+    &&  git clone https://github.com/tilemill-project/tilemill.git \
+    &&  cd tilemill       \
+    &&  npm install       \
+    &&  npm cache clean --force   \
+    &&  apt-get clean     \
+    &&  apt-get update 
+
+COPY run_tilemill.sh /opt/tilemill/run_tilemill.sh
+
+EXPOSE 20008
+EXPOSE 20009
+
+VOLUME /root/Documents
+
+WORKDIR /opt/tilemill
+
+CMD [ "/bin/bash", "/opt/tilemill/run_tilemill.sh" ]

+ 2 - 0
run-container.sh

@@ -0,0 +1,2 @@
+docker run --name=tilemill -e CORE_URL=0.0.0.0:20009 -e TILE_URL=0.0.0.0:20008 -v tilemill:/root/Documents -p 1100:22 -p 20008:20008 -p 20009:20009 -d -t tilemill:latest
+

+ 10 - 0
run_tilemill.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+
+# Set the locale - see http://jaredmarkell.com/docker-and-locales/
+# a work around for this error when running tilemill:
+# what():  locale::facet::_S_create_c_locale name not valid
+#TILEMILL_HOST=`ifconfig eth0 | grep 'inet addr:'| cut -d: -f2 | awk '{ print $1}'` 
+#TILEMILL_HOST=${HOST:-0.0.0.0}
+cd /opt/tilemill/tilemill
+./index.js --server=true --listenHost=${LISTEN_HOST:-0.0.0.0} --coreUrl=${CORE_URL:-0.0.0.0:20009} --tileUrl=${TILE_URL:-0.0.0.0:20008}