Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
add compose for arm
Browse files Browse the repository at this point in the history
  • Loading branch information
taryune committed Nov 29, 2023
1 parent 8f32c7c commit 0cfb7c7
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ serve:
build:
$(DOCKER_RUN_CMD) ignite chain build

## Docker compose
docker-compose-build:
docker compose build
docker-compose-up:
docker compose up
docker-compose-build-arm:
docker compose -f compose-arm.yml build
docker-compose-up-arm:
docker compose -f compose-arm.yml up

## Test
test-all-module:
go test ./x/.../
Expand Down
27 changes: 27 additions & 0 deletions compose-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: "3.9"

services:
node1:
build:
context: .
dockerfile: dockerfile-arm
networks:
- mycelnet
ports:
- "1317:1317"
- "4500:4500"
- "26657:26657"
volumes:
- "~/.mycel:/root/.mycel"
node2:
build:
context: .
dockerfile: dockerfile-arm
networks:
- mycelnet
command: bash
tty: true

networks:
mycelnet:

4 changes: 2 additions & 2 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ RUN tar -zxvf release/mycel_linux_amd64.tar.gz
FROM --platform=linux/amd64 ubuntu
ENV LD_LIBRARY_PATH=/usr/local/lib
RUN apt-get update \
&& apt-get install -y ca-certificates vim curl
&& apt-get install -y ca-certificates vim curl jq
WORKDIR /root/
RUN curl -fL 'https://github.com/CosmWasm/wasmvm/releases/download/v1.4.0/libwasmvm.x86_64.so' > /usr/local/lib/libwasmvm.x86_64.so
RUN curl -fL 'https://github.com/CosmWasm/wasmvm/releases/download/v1.5.0/libwasmvm.x86_64.so' > /usr/local/lib/libwasmvm.x86_64.so
COPY --from=builder /build/myceld /usr/local/bin
CMD ["myceld", "start"]

22 changes: 22 additions & 0 deletions dockerfile-arm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM --platform=linux/arm64 golang AS builder
USER root
WORKDIR /build/
COPY ./ /build/
RUN apt-get update \
&& apt-get install -y curl
RUN curl 'https://get.ignite.com/[email protected]'! | bash
RUN ignite chain build \
--release.targets linux:arm64 \
--output ./release \
--release
RUN tar -zxvf release/mycel_linux_arm64.tar.gz

FROM --platform=linux/arm64 ubuntu
ENV LD_LIBRARY_PATH=/usr/local/lib
RUN apt-get update \
&& apt-get install -y ca-certificates vim curl jq
WORKDIR /root/
RUN curl -fL 'https://github.com/CosmWasm/wasmvm/releases/download/v1.5.0/libwasmvm.aarch64.so' > /usr/local/lib/libwasmvm.aarch64.so
COPY --from=builder /build/myceld /usr/local/bin
CMD ["myceld", "start"]

6 changes: 6 additions & 0 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50270,6 +50270,9 @@ paths:
description: A successful response.
schema:
type: object
properties:
role:
type: string
default:
description: An unexpected error response.
schema:
Expand Down Expand Up @@ -82007,6 +82010,9 @@ definitions:
description: QueryParamsResponse is response type for the Query/Params RPC method.
mycel.registry.QueryRoleResponse:
type: object
properties:
role:
type: string
mycel.registry.SecondLevelDomainResponse:
type: object
properties:
Expand Down

0 comments on commit 0cfb7c7

Please sign in to comment.