From 9bd5e2c47350b2e7d59a51603349bfa130ba7a61 Mon Sep 17 00:00:00 2001 From: Chengka < european@iqing.com> Date: Thu, 22 Mar 2018 11:49:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E5=A5=BD=E7=9A=84docker=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 5 +++-- Gemfile.lock | 6 +----- README.md | 9 +++++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 1eeaa25..75ac027 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ -source 'https://rubygems.org' +source 'https://gems.ruby-china.org' + gem 'sinatra' -gem 'thin' \ No newline at end of file +gem 'thin' diff --git a/Gemfile.lock b/Gemfile.lock index 39d20da..0f20f58 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,11 +1,9 @@ GEM - remote: https://rubygems.org/ + remote: https://gems.ruby-china.org/ specs: - concurrent-ruby (1.0.5) daemons (1.2.6) eventmachine (1.2.5) mustermann (1.0.2) - psych (3.0.2) rack (2.0.4) rack-protection (2.0.1) rack @@ -24,8 +22,6 @@ PLATFORMS ruby DEPENDENCIES - concurrent-ruby - psych sinatra thin diff --git a/README.md b/README.md index f90068c..aab6e30 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,12 @@ POST https://sorry.xuty.tk/api//make ## 部署指南 -### 使用Docker +### 使用Docker镜像快速启动 +``` +docker run -d -p 4567:4567 daocloud.io/sorry/gif:master +``` + +### 自行构建Docker Image启动 ``` docker build -t sorry . docker run --rm -it -p 4567:4567 sorry @@ -82,7 +87,7 @@ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ # [可选] Linux服务器一般需要安装中文字体 apt install language-pack-zh-hans -apt install ttf-wqy-microhei +apt install ttf-wqy-microhei # 安装编译依赖 apt install ruby-dev build-essential