Skip to content

Commit

Permalink
update 'make docker'
Browse files Browse the repository at this point in the history
1. fix config-solo.json
2. update docker file, to support removed --password
3. update config file packing, to solo mode docker
  • Loading branch information
Honglei-Cong committed Apr 24, 2018
1 parent 8ac54fe commit e835c20
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DBUILD=docker build
DRUN=docker run
DOCKER_NS ?= ontio
DOCKER_TAG=$(ARCH)-$(VERSION)
CONFIG_FILES=$(shell ls *.json)
ONT_CFG_IN_DOCKER=config-solo.json
WALLET_FILE=wallet.dat

all: ontology nodectl
Expand All @@ -27,12 +27,14 @@ format:
$(WALLET_FILE): nodectl
./nodectl wallet -c -p passwordtest -n $(WALLET_FILE)

docker/payload: docker/build/bin/ontology docker/Dockerfile $(CONFIG_FILES) $(WALLET_FILE)
docker/payload: docker/build/bin/ontology docker/Dockerfile $(ONT_CFG_IN_DOCKER) $(WALLET_FILE)
@echo "Building ontology payload"
@mkdir -p $@
@cp docker/Dockerfile $@
@cp docker/build/bin/ontology $@
@tar czf $@/config.tgz $(CONFIG_FILES) $(WALLET_FILE)
@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 config-solo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"127.0.0.1:20338"
],
"Bookkeepers": [
"021dcb1ae0845b44bbd1ea328bf8245f0386f6611923366f0daa83a97dfd93255c"
"1202021c6750d2c5d99813997438cee0740b04a73e42664c444e778e001196eed96c9d"
],
"HttpRestPort": 20334,
"HttpWsPort":20335,
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ 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
CMD ["./ontology","-p","passwordtest"]
CMD ["/bin/sh", "-c", "echo passwordtest | ./ontology"]

0 comments on commit e835c20

Please sign in to comment.