Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Fix smrepl docker build #30

@aleckzts

Description

@aleckzts

Hi,

When trying to create a docker image with make dockerbuild-go, I got the following errors:

go build golang.org/x/sys/internal/unsafeheader: module requires Go 1.12
go build github.com/spacemeshos/go-spacemesh/crypto/sha3: module requires Go 1.14
go build go.uber.org/zap/buffer: module requires Go 1.13
go build github.com/spacemeshos/go-spacemesh/rand: module requires Go 1.14
go build github.com/grpc-ecosystem/grpc-gateway/utilities: module requires Go 1.14
go build github.com/spacemeshos/go-spacemesh/common/util: module requires Go 1.14
go build go.uber.org/atomic: module requires Go 1.13
go build go.uber.org/zap/internal/color: module requires Go 1.13
go build go.uber.org/zap/internal/exit: module requires Go 1.13
go build github.com/tyler-smith/go-bip39/wordlists: module requires Go 1.14
go build github.com/spacemeshos/poet/shared: module requires Go 1.13
go build github.com/spacemeshos/post/config: module requires Go 1.13
# google.golang.org/protobuf/proto
/go/pkg/mod/google.golang.org/protobuf@v1.25.0/proto/proto_methods.go:18:23: cannot use m.ProtoMethods() (type *protoreflect.Message) as type *struct { pragma.NoUnkeyedLiterals; Flags uint64; Size func(struct { pragma.NoUnkeyedLiterals; Message protoreflect.Message; Flags uint8 }) struct { pragma.NoUnkeyedLiterals; Size int }; Marshal func(struct { pragma.NoUnkeyedLiterals; Message protoreflect.Message; Buf []byte; Flags uint8 }) (struct { pragma.NoUnkeyedLiterals; Buf []byte }, error); Unmarshal func(struct { pragma.NoUnkeyedLiterals; Message protoreflect.Message; Buf []byte; Flags uint8; Resolver interface { FindExtensionByName(protoreflect.FullName) (protoreflect.ExtensionType, error); FindExtensionByNumber(protoreflect.FullName, protowire.Number) (protoreflect.ExtensionType, error) } }) (struct { pragma.NoUnkeyedLiterals; Flags uint8 }, error); Merge func(struct { pragma.NoUnkeyedLiterals; Source protoreflect.Message; Destination protoreflect.Message }) struct { pragma.NoUnkeyedLiterals; Flags uint8 }; CheckInitialized func(struct { pragma.NoUnkeyedLiterals; Message protoreflect.Message }) (struct { pragma.NoUnkeyedLiterals }, error) } in return argument
go build github.com/spacemeshos/smrepl/log: module requires Go 1.15

Using a newer base image with Go 1.15 solved to me.

Here is the diff:

diff --git a/Dockerfile b/Dockerfile
index bdccd64..77079f9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.11.2-alpine3.8 AS build_base
+FROM golang:1.15.13-alpine AS build_base
 RUN apk add bash make git curl unzip rsync libc6-compat gcc musl-dev
 WORKDIR /go/src/github.com/spacemeshos/smrepl

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingv0.2

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions