Skip to content

Commit

Permalink
change to dockerfile version
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtGinn committed Feb 2, 2025
1 parent 3e5908e commit d6bddb7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 104 deletions.
21 changes: 21 additions & 0 deletions scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Dockerfile

FROM alpine:latest

RUN apk add --no-cache curl grep

ENV WASM_IMPORT="github.com/CosmWasm/wasmvm/v2"
ENV WASM_GO_MOD_PATH="modules/light-clients/08-wasm/go.mod"
ENV WASM_LIBRARY="libwasmvm_muslc.x86_64.a"

# Copy the go.mod file from the correct location
COPY ${WASM_GO_MOD_PATH} /tmp/go.mod

RUN WASM_VERSION=$(grep "$WASM_IMPORT" /tmp/go.mod | awk '{print $2}') && \
echo "WASM_VERSION=${WASM_VERSION}" > /tmp/version.env

RUN source /tmp/version.env && \
curl -sL "https://github.com/CosmWasm/wasmvm/releases/download/${WASM_VERSION}/checksums.txt" | \
grep "${WASM_LIBRARY}" | awk '{print $1}' > /tmp/checksum.env

CMD echo "CosmWasm Version: $(cat /tmp/version.env)"; echo "Checksum: $(cat /tmp/checksum.env)"
104 changes: 0 additions & 104 deletions scripts/get-libwasm-version.sh

This file was deleted.

0 comments on commit d6bddb7

Please sign in to comment.