Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #15 from irisnet/develop
Browse files Browse the repository at this point in the history
Release/v0.2.0
  • Loading branch information
zhangyelong authored Jul 19, 2018
2 parents 83380c5 + 296f9d1 commit 0ff4cf1
Show file tree
Hide file tree
Showing 58 changed files with 3,105 additions and 2,121 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.idea/
vendor/
*.conf
.DS_Store
sync-iris
sync-iris-unix

38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM alpine:edge

# Set up dependencies
ENV PACKAGES go make git libc-dev bash

# Set up GOPATH & PATH

ENV PROJECT_NAME irishub-sync
ENV GOPATH /root/go
ENV BASE_PATH $GOPATH/src/github.com/irisnet
ENV REPO_PATH $BASE_PATH/$PROJECT_NAME
ENV LOG_DIR /$PROJECT_NAME/log
ENV PATH $GOPATH/bin:$PATH

# Set volumes

VOLUME $LOG_DIR

# Link expected Go repo path

RUN mkdir -p $GOPATH/pkg $GOPATH/bin $BASE_PATH $REPO_PATH $LOG_DIR

# Add source files

COPY . $REPO_PATH

# Install minimum necessary dependencies, build irishub-server
RUN apk add --no-cache $PACKAGES && \
cd $REPO_PATH && make all && \
mv $REPO_PATH/$PROJECT_NAME $GOPATH/bin && \
rm -rf $REPO_PATH/vendor && \
rm -rf $GOPATH/src/github.com/golang $GOPATH/bin/dep $GOPATH/pkg/* && \
apk del $PACKAGES

VOLUME ["$LOG_DIR"]


CMD irishub-sync > $LOG_DIR/debug.log && tail -f $LOG_DIR/debug.log
Loading

0 comments on commit 0ff4cf1

Please sign in to comment.