Skip to content

Commit

Permalink
docker: release Linux/ARM64 image (#5925)
Browse files Browse the repository at this point in the history
Co-authored-by: Marko <[email protected]>
  • Loading branch information
2 people authored and tessr committed Feb 11, 2021
1 parent d575f8a commit 9df5fcf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
<<<<<<< HEAD
- uses: actions/setup-go@v2
with:
go-version: "^1.15.4"
=======
>>>>>>> cd3ebe875... docker: release Linux/ARM64 image (#5925)
- uses: actions/checkout@master
- name: Prepare
id: prep
Expand All @@ -37,6 +40,11 @@ jobs:
fi
echo ::set-output name=tags::${TAGS}
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

Expand All @@ -46,14 +54,11 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Tendermint
run: |
make build-linux && cp build/tendermint DOCKER/tendermint
- name: Publish to Docker Hub
uses: docker/build-push-action@v2
with:
context: ./DOCKER
context: .
file: ./DOCKER/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
17 changes: 13 additions & 4 deletions DOCKER/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
FROM alpine:3.9
# stage 1 Generate Tendermint Binary
FROM golang:1.15-alpine as builder
RUN apk update && \
apk upgrade && \
apk --no-cache add make
COPY / /tendermint
WORKDIR /tendermint
RUN make build-linux

# stage 2
FROM golang:1.15-alpine
LABEL maintainer="[email protected]"

# Tendermint will be looking for the genesis file in /tendermint/config/genesis.json
Expand Down Expand Up @@ -29,15 +39,14 @@ EXPOSE 26656 26657 26660

STOPSIGNAL SIGTERM

ARG BINARY=tendermint
COPY $BINARY /usr/bin/tendermint
COPY --from=builder /tendermint/build/tendermint /usr/bin/tendermint

# You can overwrite these before the first run to influence
# config.json and genesis.json. Additionally, you can override
# CMD to add parameters to `tendermint node`.
ENV PROXY_APP=kvstore MONIKER=dockernode CHAIN_ID=dockerchain

COPY ./docker-entrypoint.sh /usr/local/bin/
COPY ./DOCKER/docker-entrypoint.sh /usr/local/bin/

ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["node"]
Expand Down

0 comments on commit 9df5fcf

Please sign in to comment.