Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated dockerfile for arm64. #1261

Merged
merged 4 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ The `v1.13.0` release includes minor bug fixes and enhancements along with a res
* Added two new Makefile targets to install and start the relayer [#1051] (https://github.com/provenance-io/provenance/pull/1051)
* Updated relayer scripts to make them headless for external services [#1068] (https://github.com/provenance-io/provenance/pull/1068)
* Added docker environment for testing IBC and added Makefile targets to bring this environment up/down [#1248] (https://github.com/provenance-io/provenance/pull/1248).
* Updated provenance-io/blockchain image to work with arm64 [#1261]. (https://github.com/provenance-io/provenance/pull/1261)

### Bug Fixes

Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,11 @@ vendor:

# Full build inside a docker container for a clean release build
docker-build: vendor
docker build --build-arg VERSION=$(VERSION) -t provenance-io/blockchain . -f docker/blockchain/Dockerfile
ifeq ($(UNAME_M),x86_64)
docker build --build-arg VERSION=$(VERSION) --build-arg ARCH=$(UNAME_M) -t provenance-io/blockchain . -f docker/blockchain/Dockerfile
else
iramiller marked this conversation as resolved.
Show resolved Hide resolved
docker build --build-arg VERSION=$(VERSION) --build-arg ARCH=aarch64 -t provenance-io/blockchain . -f docker/blockchain/Dockerfile
endif

# Quick build using local environment and go platform target options.
docker-build-local: vendor
Expand Down
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

# Quick reference (cont.)

- **Supported architectures**: [`amd64`]
- **Why not more?**: Upstream dependencies currently lock us into amd64 (namely libwasm). There are future plans for other architectures.
- **Supported architectures**: [`x86_64, aarch64`]
- **Why not more?**: Upstream dependencies currently lock us into x86_64 and aarch64 (namely libwasm). There are future plans for other architectures.
- **Source of this description**: [docs](https://github.com/provenance-io/provenance/blob/main/docker/README.md)

# What is this image?
Expand Down
6 changes: 4 additions & 2 deletions docker/blockchain/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM golang:1.18-bullseye as build
ARG VERSION
ARG ARCH=x86_64

WORKDIR /go/src/github.com/provenance-io/provenance

Expand All @@ -26,14 +27,15 @@ RUN make VERSION=${VERSION} install

###
FROM debian:bullseye-slim as run

ARG ARCH=x86_64
ENV LD_LIBRARY_PATH="/usr/local/lib"
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y curl jq libleveldb-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/

COPY --from=build /go/src/github.com/provenance-io/provenance/vendor/github.com/CosmWasm/wasmvm/internal/api/libwasmvm.x86_64.so /lib/x86_64-linux-gnu/libwasmvm.x86_64.so
COPY --from=build /go/src/github.com/provenance-io/provenance/vendor/github.com/CosmWasm/wasmvm/internal/api/libwasmvm.$ARCH.so /usr/local/lib
COPY --from=build /go/bin/provenanced /usr/bin/provenanced

ENV PIO_HOME=/home/provenance
Expand Down