Skip to content

Commit

Permalink
fix dockerfile merge; add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnfoo committed Sep 15, 2023
1 parent 71e42a9 commit 63d1608
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,4 @@
# docker build . -t cosmwasm/wasmd:latest
# docker run --rm -it cosmwasm/wasmd:latest /bin/sh
FROM golang:1.19-alpine3.15 AS go-builder
ARG arch=x86_64

# this comes from standard alpine nightly file
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile
# with some changes to support our toolchain, etc
RUN set -eux; apk add --no-cache ca-certificates build-base;

RUN apk add git
# NOTE: add these to run with LEDGER_ENABLED=true
# RUN apk add libusb-dev linux-headers

WORKDIR /code
COPY . /code/
# See https://github.com/CosmWasm/wasmvm/releases
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.3.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.3.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep b1610f9c8ad8bdebf5b8f819f71d238466f83521c74a2deb799078932e862722
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep b4aad4480f9b4c46635b4943beedbb72c929eab1d1b9467fe3b43e6dbf617e32

# 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

# force it to use static lib (from above) not standard libgo_cosmwasm.so file
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build
RUN echo "Ensuring binary is statically linked ..." \
&& (file /code/build/wasmd | grep "statically linked")

# --------------------------------------------------------
# FIXME after release --------------------------------------------------------
FROM --platform=linux/amd64 ubuntu:22.04
ARG RELEASE_URL=https://github.com/nymtech/nyxd/releases/download/v0.32.0/nyxd-ubuntu-22.04.tar.gz
ARG ARCHIVE_NAME=nyxd-ubuntu-22.04.tar.gz
Expand Down

0 comments on commit 63d1608

Please sign in to comment.