Skip to content

Commit

Permalink
ci: modify Dockerfile.static
Browse files Browse the repository at this point in the history
  • Loading branch information
shiki-tak committed Jul 29, 2022
1 parent 1ac7c72 commit 756ee5c
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions builders/Dockerfile.static
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,10 @@ COPY ./go.mod /lbm-build/lbm/go.mod
COPY ./go.sum /lbm-build/lbm/go.sum
RUN go mod download

# Build cosmwasm
ENV RUSTUP_HOME=/usr/local/rustup
ENV CARGO_HOME=/usr/local/cargo
ENV PATH=$CARGO_HOME/bin:$PATH

RUN wget "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-musl/rustup-init"
RUN chmod +x rustup-init
RUN ./rustup-init -y --no-modify-path --default-toolchain 1.57.0; rm rustup-init
RUN chmod -R a+w $RUSTUP_HOME $CARGO_HOME
RUN cd $(go list -f "{{ .Dir }}" -m github.com/line/wasmvm) && \
cd ./libwasmvm && \
RUSTFLAGS='-C target-feature=-crt-static' cargo build --release --example staticlib && \
mv -f target/release/examples/libstaticlib.a /usr/lib/libwasmvm_static.a && \
rm -rf target
# See https://github.com/CosmWasm/wasmvm/releases
ADD https://github.com/line/wasmvm/releases/download/v1.0.0-0.10.0/libwasmvm_static.x86_64.a /lib/libwasmvm_static.x86_64.a

RUN ln -s /lib/libwasmvm_static.x86_64.a /usr/lib/libwasmvm_static.a

# Add source files
COPY . .
Expand Down

0 comments on commit 756ee5c

Please sign in to comment.