Skip to content

Commit

Permalink
remove config and wallet from docker construct (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiluge authored and laizy committed Aug 6, 2018
1 parent 3d07c96 commit b7e2fcf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -27,3 +27,4 @@ cscope*
neosnapshot/*
glide.lock
*.iml
docker/payload
10 changes: 1 addition & 9 deletions Makefile
Expand Up @@ -8,8 +8,6 @@ DBUILD=docker build
DRUN=docker run
DOCKER_NS ?= ontio
DOCKER_TAG=$(ARCH)-$(VERSION)
ONT_CFG_IN_DOCKER=config.json
WALLET_FILE=wallet.dat

SRC_FILES = $(shell git ls-files | grep -e .go$ | grep -v _test.go)
TOOLS=./tools
Expand Down Expand Up @@ -65,17 +63,11 @@ all-cross: ontology-cross tools-cross abi
format:
$(GOFMT) -w main.go

$(WALLET_FILE):
@if [ ! -e $(WALLET_FILE) ]; then $(error Please create wallet file first) ; fi

docker/payload: docker/build/bin/ontology docker/Dockerfile $(ONT_CFG_IN_DOCKER) $(WALLET_FILE)
docker/payload: docker/build/bin/ontology docker/Dockerfile
@echo "Building ontology payload"
@mkdir -p $@
@cp docker/Dockerfile $@
@cp docker/build/bin/ontology $@
@cp -f $(ONT_CFG_IN_DOCKER) $@/config.json
@cp -f $(WALLET_FILE) $@
@tar czf $@/config.tgz -C $@ config.json $(WALLET_FILE)
@touch $@

docker/build/bin/%: Makefile
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -289,7 +289,7 @@ Please ensure there are docker environment in your machine.

- Use command `docker run ontio/ontology`to run ontology;

- If you need to allow interactive keyboard input while the image is running, you can use the `docker -ti run ontio/ontology` command to start the image;
- If you need to allow interactive keyboard input while the image is running, you can use the `docker run -ti ontio/ontology` command to start the image;

- If you need to keep the data generated by image at runtime, you can refer to the data persistence function of docker (e.g. valume);

Expand Down
3 changes: 2 additions & 1 deletion README_CN.md
Expand Up @@ -41,6 +41,7 @@ Ontology致力于创建一个组件化、可自由配置、跨链支持、高性
* [单机部署配置](#单机部署配置)
* [多机部署配置](#多机部署配置)
* [运行](#运行)
* [使用docker运行](#使用docker运行)
* [ONT转账调用示例](#ont转账调用示例)
* [贡献代码](#贡献代码)
* [开源社区](#开源社区)
Expand Down Expand Up @@ -264,7 +265,7 @@ ontology的运行支持以下4种方式

- 使用命令`docker run ontio/ontology`运行ontology;

- 如果需要使镜像运行时接受交互式键盘输入,则使用`docker -ti run ontio/ontology`命令启动镜像即可;
- 如果需要使镜像运行时接受交互式键盘输入,则使用`docker run -ti ontio/ontology`命令启动镜像即可;

- 如果需要保留镜像每次运行时的数据,可以参考docker的数据持久化功能(例如 valume);

Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile
Expand Up @@ -3,7 +3,6 @@ FROM tianon/ubuntu-core:14.04
ENV ONTOLOGY_PATH /var/ontology
RUN mkdir -p $ONTOLOGY_PATH
COPY ontology $ONTOLOGY_PATH
ADD config.tgz $ONTOLOGY_PATH
EXPOSE 20334 20335 20336 20337 20338 20339
WORKDIR $ONTOLOGY_PATH
ENTRYPOINT ["./ontology"]
Expand Down

0 comments on commit b7e2fcf

Please sign in to comment.