Skip to content

Commit

Permalink
Update go.mod (#272)
Browse files Browse the repository at this point in the history
* Update go.mod

Bump back down to go 1.18

* Also downgrade docker build to go 1.18

* Inline ignore Dockerfile linter rules that we don't care about

* Use alpine pipefail incantation

* Appease hadolint

* Correct git version

* Untag git version

Co-authored-by: Alex Lynham <[email protected]>
  • Loading branch information
faddat and the-frey authored Aug 24, 2022
1 parent b384d5b commit 97a626c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# docker build . -t cosmoscontracts/juno:latest
# docker run --rm -it cosmoscontracts/juno:latest /bin/sh
FROM golang:1.19-alpine3.15 AS go-builder
FROM golang:1.18-alpine3.15 AS go-builder

# 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
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
# we probably want to default to latest and error
# since this is predominantly for dev use
# hadolint ignore=DL3018
RUN set -eux; apk add --no-cache ca-certificates build-base;

# hadolint ignore=DL3018
RUN apk add git
# NOTE: add these to run with LEDGER_ENABLED=true
# RUN apk add libusb-dev linux-headers
Expand All @@ -21,12 +26,14 @@ RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 7d2239e9f25e96d0d4daba982ce9
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep f6282df732a13dec836cda1f399dd874b1e3163504dbd9607c6af915b2740479

# Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc`
RUN cp /lib/libwasmvm_muslc.$(uname -m).a /lib/libwasmvm_muslc.a
RUN cp "/lib/libwasmvm_muslc.$(uname -m).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 file /code/bin/junod
RUN echo "Ensuring binary is statically linked ..." \
# then log output of file /code/bin/junod
# then ensure static linking
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \
&& file /code/bin/junod \
&& echo "Ensuring binary is statically linked ..." \
&& (file /code/bin/junod | grep "statically linked")

# --------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/CosmosContracts/juno/v10

go 1.19
go 1.18

require (
github.com/CosmWasm/wasmd v0.28.0
Expand Down

0 comments on commit 97a626c

Please sign in to comment.