From 84272b7b39cdb74609b5ad89298ceab96f8a83f2 Mon Sep 17 00:00:00 2001 From: Hongcai Deng Date: Thu, 31 Dec 2015 11:18:15 +0800 Subject: [PATCH] add Dockerfile --- Dockerfile | 16 ++++++++++++++++ README.md | 6 ++++++ package.json | 2 +- public/index.html | 1 + 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2d6cfa2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM node:latest +MAINTAINER Hongcai Deng + +RUN apt-get clean all +RUN apt-get update +RUN apt-get -y install git +RUN git clone https://github.com/denghongcai/forsaken-mail.git /forsaken-mail + +WORKDIR /forsaken-mail + +RUN npm config set disturl https://npm.taobao.org/dist +RUN npm config set registry https://registry.npm.taobao.org +RUN npm install + +EXPOSE 25 +CMD npm start \ No newline at end of file diff --git a/README.md b/README.md index f9ff3a0..4b64647 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,12 @@ In order to receive emails, your smtp server address should be made available so You can fire up Mailin (see next section) and use an [smtp server tester](http://mxtoolbox.com/diagnostic.aspx) to verify that everything is correct. #### Let's Go +general way: ``` npm install && npm start ``` +if you want run this inside a docker container +``` +docker build -t denghongcai/forsaken-mail . +docker run --name forsaken-mail -d -p 25:25 denghongcai/forsaken-mail +``` diff --git a/package.json b/package.json index 4066fb8..373449e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "forsaken-mail", - "version": "0.0.1", + "version": "0.1.0", "description": "", "main": "app.js", "scripts": { diff --git a/public/index.html b/public/index.html index 8758e94..c83f0ca 100644 --- a/public/index.html +++ b/public/index.html @@ -42,6 +42,7 @@
可爱的小狗
+

汪汪汪