diff --git a/.github/workflows/cosmoshub.yml b/.github/workflows/cosmoshub.yml index f07beac5..1f0a96ae 100644 --- a/.github/workflows/cosmoshub.yml +++ b/.github/workflows/cosmoshub.yml @@ -45,18 +45,11 @@ jobs: - name: Manually pull the base Docker image run: | echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - docker pull ghcr.io/p2p-org/cosmos-heighliner:cosmoshub-v18.1.0 - - - name: Pull gaiad binary - run: | - cd temp/ - wget https://github.com/cosmos/gaia/releases/download/v19.1.0/gaiad-v19.1.0-linux-amd64 + docker pull ghcr.io/p2p-org/cosmos-heighliner:infra-toolkit-${{ env.INFRA_TOOLKIT }} - name: Build and push cosmoshub Docker image run: | - echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - cd temp/ - docker build -t gaia:${{ env.VERSION }} . + ./heighliner build -c gaia --git-ref ${{ env.VERSION }} - name: Tag and push Docker image run: | diff --git a/dockerfile/cosmos/native.Dockerfile b/dockerfile/cosmos/native.Dockerfile index 25ce3e76..1f975dd5 100644 --- a/dockerfile/cosmos/native.Dockerfile +++ b/dockerfile/cosmos/native.Dockerfile @@ -42,7 +42,8 @@ RUN set -eux;\ WASMVM_REPO=$(echo $WASMVM_VERSION | awk '{print $1}');\ WASMVM_VERS=$(echo $WASMVM_VERSION | awk '{print $2}');\ wget -O /lib/libwasmvm_muslc.a https://${WASMVM_REPO}/releases/download/${WASMVM_VERS}/libwasmvm_muslc.$(uname -m).a;\ - ln /lib/libwasmvm_muslc.a /lib/libwasmvm_muslc.$(uname -m).a;\ + cp /lib/libwasmvm_muslc.a /lib/libwasmvm_muslc.$(uname -m).a;\ + cp /lib/libwasmvm_muslc.a /lib/libwasmvm.$(uname -m).a;\ fi;\ export CGO_ENABLED=1 LDFLAGS='-linkmode external -extldflags "-static"';\ if [ ! -z "$PRE_BUILD" ]; then sh -c "${PRE_BUILD}"; fi;\ @@ -119,65 +120,9 @@ LABEL org.opencontainers.image.source="https://github.com/p2p-org/cosmos-heighli WORKDIR /bin -<<<<<<< HEAD -# Install ln (for making hard links) and rm (for cleanup) from full busybox image (will be deleted, only needed for image assembly) -COPY --from=busybox-full /bin/ln /bin/mv /bin/rm /bin/mkdir /bin/dirname ./ - -# Install minimal busybox image as shell binary (will create hardlinks for the rest of the binaries to this data) -COPY --from=infra-toolkit /busybox/busybox /bin/sh - -# Install jq -COPY --from=infra-toolkit /usr/local/bin/jq /bin/ - -# Add hard links for read-only utils -# Will then only have one copy of the busybox minimal binary file with all utils pointing to the same underlying inode -RUN for b in \ - cat \ - date \ - df \ - du \ - env \ - grep \ - head \ - less \ - ls \ - md5sum \ - pwd \ - sha1sum \ - sha256sum \ - sha3sum \ - sha512sum \ - sleep \ - stty \ - tail \ - tar \ - tee \ - tr \ - watch \ - which \ - ; do ln sh $b; done - -# Copy over absolute path directories -COPY --from=build-env /root/dir_abs /root/dir_abs -COPY --from=build-env /root/dir_abs.list /root/dir_abs.list - -# Move absolute path directories to their absolute locations. -RUN sh -c 'i=0; while read DIR; do\ - echo "$i: $DIR";\ - PLACEDIR="$(dirname "$DIR")";\ - mkdir -p "$PLACEDIR";\ - mv /root/dir_abs/$i $DIR;\ - i=$((i+1));\ - done < /root/dir_abs.list' - -# Remove write utils -RUN rm ln rm mv mkdir dirname - -======= # Install jq COPY --from=infra-toolkit /usr/local/bin/jq /bin/ ->>>>>>> e4b18ef (Update scratch image to plain apline:3 like a final image) # Install chain binaries COPY --from=build-env /root/bin /bin diff --git a/temp/Dockerfile b/temp/Dockerfile deleted file mode 100644 index 3527fcb9..00000000 --- a/temp/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM ghcr.io/p2p-org/cosmos-heighliner:cosmoshub-v18.1.0 - -# Copy the new gaiad binary into the container -COPY ./gaiad-v19.1.0-linux-amd64 /bin/gaiad - -# Ensure the binary is executable -RUN chmod +x /bin/gaiad