Skip to content

Commit 97a626c

Browse files
faddatthe-frey
andauthored
Update go.mod (CosmosContracts#272)
* 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]>
1 parent b384d5b commit 97a626c

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

Dockerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# docker build . -t cosmoscontracts/juno:latest
22
# docker run --rm -it cosmoscontracts/juno:latest /bin/sh
3-
FROM golang:1.19-alpine3.15 AS go-builder
3+
FROM golang:1.18-alpine3.15 AS go-builder
44

55
# this comes from standard alpine nightly file
66
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile
77
# with some changes to support our toolchain, etc
8+
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
9+
# we probably want to default to latest and error
10+
# since this is predominantly for dev use
11+
# hadolint ignore=DL3018
812
RUN set -eux; apk add --no-cache ca-certificates build-base;
913

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

2328
# Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc`
24-
RUN cp /lib/libwasmvm_muslc.$(uname -m).a /lib/libwasmvm_muslc.a
29+
RUN cp "/lib/libwasmvm_muslc.$(uname -m).a" /lib/libwasmvm_muslc.a
2530

2631
# force it to use static lib (from above) not standard libgo_cosmwasm.so file
27-
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build
28-
RUN file /code/bin/junod
29-
RUN echo "Ensuring binary is statically linked ..." \
32+
# then log output of file /code/bin/junod
33+
# then ensure static linking
34+
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \
35+
&& file /code/bin/junod \
36+
&& echo "Ensuring binary is statically linked ..." \
3037
&& (file /code/bin/junod | grep "statically linked")
3138

3239
# --------------------------------------------------------

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/CosmosContracts/juno/v10
22

3-
go 1.19
3+
go 1.18
44

55
require (
66
github.com/CosmWasm/wasmd v0.28.0

0 commit comments

Comments
 (0)