Skip to content

Commit

Permalink
add dockerfiles to cleanup mess
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverHappened committed Oct 18, 2023
1 parent 9e56679 commit a2139a0
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 2 deletions.
13 changes: 13 additions & 0 deletions integration-tests/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
APP_DIR ?= ../..
COMPOSE ?= docker-compose

build-gaia:
@docker buildx build --load --build-context app=$(APP_DIR)/gaia --build-context setup=$(APP_DIR)/neutron/network -t gaia-node-airdroptest -f dockerbuilds/Dockerfile.gaia --build-arg BINARY=gaiad .

build-neutron:
cd $(APP_DIR)/neutron && $(MAKE) build-docker-image

build-hermes:
@docker build -f dockerbuilds/Dockerfile.hermes -t hermes-airdroptest .

build-all: build-gaia build-neutron build-hermes
24 changes: 24 additions & 0 deletions integration-tests/dockerbuilds/Dockerfile.gaia
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# syntax=docker/dockerfile:1

FROM golang:1.20-alpine AS builder
RUN apk upgrade -U -a
WORKDIR /src/app/
COPY --from=app go.mod go.sum* ./
RUN go mod download
COPY --from=app . .
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3
RUN apk add --no-cache $PACKAGES
RUN CGO_ENABLED=0 make install

FROM alpine:latest
WORKDIR /opt/node/
COPY --from=setup . setup/
ARG BINARY
COPY --from=builder /go/bin/${BINARY:-gaiad} /usr/local/bin/

EXPOSE 26656 26657 1317 9090
USER 0

CMD sh /opt/node/setup/init.sh && \
sh /opt/node/setup/init-gaiad.sh && \
sh /opt/node/setup/start.sh
13 changes: 13 additions & 0 deletions integration-tests/dockerbuilds/Dockerfile.hermes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ubuntu:23.04
ARG HERMES_VERSION=v1.4.0
WORKDIR /app
RUN apt-get update && apt-get install -y wget && \
PLATFORM=`uname -a | awk '{print $(NF-1)}'` && \
VERSION=$HERMES_VERSION && \
TARNAME="hermes-${VERSION}-${PLATFORM}-unknown-linux-gnu.tar.gz" && \
wget "https://github.com/informalsystems/hermes/releases/download/${VERSION}/${TARNAME}" && \
tar -xf "$TARNAME" && \
mv ./hermes /usr/local/bin/ && \
rm -rf "$TARNAME"

ENTRYPOINT ["hermes", "start"]
4 changes: 2 additions & 2 deletions integration-tests/src/testSuite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const networkConfigs = {
binary: 'gaiad',
chain_id: 'testgaia-1',
denom: 'uatom',
image: 'gaia-node',
image: 'gaia-node-airdroptest',
prefix: 'cosmos',
validators: 1,
validators_balance: '1000000000',
Expand Down Expand Up @@ -84,7 +84,7 @@ const relayersConfig = {
'chains.0.trusting_period': '14days',
'chains.0.unbonding_period': '504h0m0s',
},
image: 'hermes',
image: 'hermes-airdroptest',
log_level: 'trace',
type: 'hermes',
}
Expand Down

0 comments on commit a2139a0

Please sign in to comment.