• R/O
  • HTTP
  • SSH
  • HTTPS

shogi-server: コミット

shogi-server source


コミットメタ情報

リビジョンa8d6c15f45f86d8f76ef441409a87df66c3965f8 (tree)
日時2016-11-26 18:02:22
作者Daigo Moriwaki <daigo@debi...>
コミッターDaigo Moriwaki

ログメッセージ

Fix #36822: Build a Docker image for Shogi-server

変更サマリ

差分

--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,14 @@
1+Dockerfile
2+.dockerignore
3+.git
4+.*
5+00LIST
6+logs
7+20*
8+**/20*
9+**/*.log
10+**/*.yaml
11+**/*.conf
12+**/*.sh
13+**/*.back
14+**/*.dat
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
1+.image-*
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,20 @@
1+FROM debian
2+MAINTAINER Daigo Moriwaki <daigo@debian.org>
3+
4+RUN apt-get update && apt-get install -y \
5+ apt-utils \
6+ ruby ruby-gsl
7+RUN gem install rgl
8+
9+ENV EVENT local
10+ENV PORT 4081
11+ENV MAX_IDENTIFIER 32
12+
13+WORKDIR /shogi-server
14+CMD mkdir $WORKDIR
15+CMD mkdir /logs
16+
17+COPY . ./
18+
19+CMD ./shogi-server --daemon /logs --pid-file shogi-server.pid --max-identifier $MAX_IDENTIFIER $EVENT $PORT && tail -F /logs/shogi-server.log
20+
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,12 @@ stop-daemon:
2121 test-time-run:
2222 ruby -r sample/test_time.rb ./shogi-server --floodgate-games floodgate-900-0,floodgate-3600-0 hoge 4000
2323
24+.PHONY: image-build
25+image-build: .image-build
26+.image-build: Dockerfile
27+ docker build -t shogi-server/shogi-server:latest -f $< .
28+ docker images -q shogi-server/shogi-server:latest > $@
29+
2430 .PHONY: clean
2531 clean:
26- -rm -rf doc
32+ -rm -rf doc .image-*
--- a/changelog
+++ b/changelog
@@ -7,6 +7,12 @@
77 by specifying randomly generated tokens. It would of help to add a
88 new command line option --max-identifier to overwrite the default
99 maximum length.
10+ * Build a Docker image for Shogi-server
11+ (Closes #36822)
12+ - Build a Docker image
13+ % make image-build
14+ - Running a local shogi-server would look like
15+ % docker run -p 4081:4081 -v `pwd`/logs:/logs shogi-server/shogi-server
1016
1117 2016-04-09 Daigo Moriwaki <daigo at debian dot org>
1218
旧リポジトリブラウザで表示