-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Using Debian-based image with Go 1.22 | ||
# - go 1.22, required by rollkit | ||
# - Debian for building the wasmd binary | ||
FROM golang:1.22 AS build-env | ||
|
||
# Install system dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
git \ | ||
make \ | ||
sed \ | ||
gcc \ | ||
libc-dev \ | ||
wget \ | ||
bash \ | ||
curl \ | ||
jq \ | ||
ranger \ | ||
vim \ | ||
libc6 \ | ||
ca-certificates \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set working directory for the build | ||
WORKDIR /src | ||
|
||
# Download wasmd repo | ||
RUN git clone https://github.com/CosmWasm/wasmd.git | ||
|
||
# Set working directory to wasmd | ||
WORKDIR /src/wasmd | ||
|
||
# Update Dependencies | ||
RUN git checkout tags/v0.50.0 && \ | ||
go mod edit -replace github.com/cosmos/cosmos-sdk=github.com/rollkit/[email protected] && \ | ||
go mod tidy -compat=1.17 && \ | ||
go mod download | ||
|
||
# Comment out lines 902-904 in app.go as temporary fix until CosmWasm/wasmd#1785 is resolved. | ||
RUN sed -i '902,904 s/^/\/\//' ./app/app.go | ||
|
||
# Build the wasmd binary | ||
RUN make install | ||
|
||
# Grab in the init.sh script from the docs | ||
RUN wget https://rollkit.dev/cosmwasm/init.sh | ||
|
||
# Comment out the wasmd start command lines so that we just initialize the environment | ||
RUN sed -i '/wasmd start/s/^/#/' init.sh | ||
|
||
RUN bash init.sh | ||
|
||
EXPOSE 36657 36656 9290 | ||
|
||
# Keep the container running | ||
CMD tail -F /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# CosmWasm | ||
|
||
This repository contains the supporting code for the [CosmWasm tutorial](https://rollkit.dev/tutorials/cosmwasm). | ||
|
||
## Overview | ||
|
||
The `main` branch contains the Dockerfile and Kurtosis packages for the CosmWasm tutorial. | ||
|
||
The `tutorial` branch contains the CosmWasm wasmd code that is used to build the binary for reference. |