Docker 中部署 StackEdit
由 瞳人
发布于 July 10, 2015, 5:54 p.m.
0 个评论
StackEdit 是一个 Markdown 编辑器. 本文介绍如何在 Docker 中运行 StackEdit.
StackEdit
StackEdit is a full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.
Build Docker Image
很简单, 就一个 Dockerfile
文件.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | FROM aplusplus/ubuntu:14.04 MAINTAINER Shengwei An (njuaplusplus # google mail) RUN apt-get update \ && apt-get install -y curl git \ && curl -sL https://deb.nodesource.com/setup_0.12 | bash - \ && apt-get install -y nodejs \ && rm -rf /var/lib/apt/lists/* \ && git clone https://github.com/benweet/stackedit.git WORKDIR /stackedit RUN npm install \ && npm install bower \ && node_modules/bower/bin/bower install --production --config.interactive=false --allow-root EXPOSE 3000 CMD nodejs server.js |
Build image:
1 | docker build -t aplusplus/stackedit . |
Run container
1 | docker run -d -p 3000:3000 aplusplus/stackedit |
然后用浏览器打开 http://yourdomain.com:3000.
0 Comments