Skip to content

Commit

Permalink
docker build with envs (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
SashaZezulinsky authored Sep 1, 2020
1 parent 2b59706 commit 4d2ecb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ jobs:
- name: docker login
run: docker login docker.pkg.github.com -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
- name: docker build
run: docker build . -f Dockerfile -e NETWORK=devin DATADIR=~/.devin -t docker.pkg.github.com/core-coin/go-core/gocore:${{steps.vars.outputs.tag}} -t docker.pkg.github.com/core-coin/go-core/gocore:latest
run: docker build . -f Dockerfile -t docker.pkg.github.com/core-coin/go-core/gocore:${{steps.vars.outputs.tag}} -t docker.pkg.github.com/core-coin/go-core/gocore:latest
- name: docker push
run: docker push docker.pkg.github.com/core-coin/go-core/gocore
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ ARG ALLTOOLS
RUN apk add --no-cache make gcc musl-dev linux-headers git

ADD . /go-core
RUN if [[ -n "$ALLTOOLS" ]] ; then \
cd /go-core && make all \
else \
cd /go-core && make gocore \
fi
RUN if [[ -n "$ALLTOOLS" ]] ; then cd /go-core && make all ; else cd /go-core && make gocore ; fi

# Pull Gocore into a second stage deploy alpine container
FROM alpine:latest
Expand All @@ -27,4 +23,4 @@ RUN apk add --no-cache ca-certificates
COPY --from=builder /go-core/build/bin/* /usr/local/bin/

EXPOSE 30300 30300/udp
ENTRYPOINT ["gocore", "--datadir=${DATADIR}", "--keystore=${KEYDIR}", "--${NETWORK}", "--nat", "auto", "--syncmode=${SYNCMODE}", "--gcmode=${GCMODE}"]
ENTRYPOINT gocore --datadir=${DATADIR} --keystore=${KEYDIR} --${NETWORK} --syncmode=${SYNCMODE} --gcmode=${GCMODE}

0 comments on commit 4d2ecb9

Please sign in to comment.