This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from irisnet/develop
Release/v0.2.0
- Loading branch information
Showing
58 changed files
with
3,105 additions
and
2,121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.idea/ | ||
vendor/ | ||
*.conf | ||
.DS_Store | ||
sync-iris | ||
sync-iris-unix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.