Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cosmos/ibc-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: notional-labs/ibc-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: faddat/new-docker-base
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 5 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 16, 2023

  1. build and push a docker base image, only when that base file changes,…

    … saving 2-3m per e2e
    faddat committed Sep 16, 2023

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    55b2ce0 View commit details
  2. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    e9e7d94 View commit details
  3. create docker base image

    faddat committed Sep 16, 2023

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    c52e46c View commit details
  4. don't push if it is a pr

    faddat committed Sep 16, 2023

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    54bb9c4 View commit details
  5. default dockerfile for now

    faddat committed Sep 16, 2023

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    9200d2e View commit details
Showing with 56 additions and 0 deletions.
  1. +35 −0 .github/workflows/docker-base.yml
  2. +21 −0 Dockerfile.base
35 changes: 35 additions & 0 deletions .github/workflows/docker-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Docker Base
on:
push:
paths:
- 'Dockerfile.base'


# We avoid complex tags by always using the latest tag for the base image.
# That will work beccause we only build this when we want to change the base image used.

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
file: ./Dockerfile.base
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }} # Don't push on PR
tags: |
ghcr.io/cosmos/ibc-go/docker-base:latest
21 changes: 21 additions & 0 deletions Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM golang:1.21-alpine3.18 as builder
ARG arch=x86_64
ARG IBC_GO_VERSION

RUN set -eux; apk add --no-cache git libusb-dev linux-headers gcc musl-dev make ca-certificates build-base;

ENV GOPATH=""
ENV GOMODULE="on"

# ensure the ibc go version is being specified for this image.
RUN test -n "${IBC_GO_VERSION}"

# Grab the static library and copy it to location that will be found by the linker flag `-lwasmvm_muslc`.
# TODO: nice to have: a script to download version matching the wasmvm version in go.mod.
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.4.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.4.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 2a72c7062e3c791792b3dab781c815c9a76083a7997ce6f9f2799aaf577f3c25
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 8ea2e3b5fae83e671da2bb51115adc88591045953f509955ec38dc02ea5a7b94

# Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc`
RUN cp /lib/libwasmvm_muslc.${arch}.a /lib/libwasmvm_muslc.a