docker: upgrade Golang version to 1.18

Otherwise it fails with:
```
build github.com/status-im/status-go/cmd/statusd: cannot load github.com/lucas-clemente/quic-go/internal/qtls: no Go source files
```

We also add missing `g++` compiler for `go-libutp` to fix:
```
go build github.com/anacrolix/go-libutp: g++: exec: "g++": executable file not found in $PATH
```

As well as install `libgcc` and `libstdc++` to avoids failures like this:
```
Error loading shared library libstdc++.so.6: No such file or directory (needed by /usr/local/bin/statusd)
Error loading shared library libgcc_s.so.1: No such file or directory (needed by /usr/local/bin/statusd)
Error relocating /usr/local/bin/statusd: _Znwm: symbol not found
Error relocating /usr/local/bin/statusd: _ZdlPvm: symbol not found
Error relocating /usr/local/bin/statusd: _Unwind_Resume: symbol not found
Error relocating /usr/local/bin/statusd: __gxx_personality_v0: symbol not found
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-07-26 12:42:19 +02:00
parent 031d913617
commit 8191f24ef3
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# Build status-go in a Go builder container # Build status-go in a Go builder container
FROM golang:1.13-alpine as builder FROM golang:1.18-alpine as builder
RUN apk add --no-cache make gcc musl-dev linux-headers RUN apk add --no-cache make gcc g++ musl-dev linux-headers
ARG build_tags ARG build_tags
ARG build_flags ARG build_flags
@ -18,7 +18,7 @@ LABEL maintainer="support@status.im"
LABEL source="https://github.com/status-im/status-go" LABEL source="https://github.com/status-im/status-go"
LABEL description="status-go is an underlying part of Status - a browser, messenger, and gateway to a decentralized world." LABEL description="status-go is an underlying part of Status - a browser, messenger, and gateway to a decentralized world."
RUN apk add --no-cache ca-certificates bash RUN apk add --no-cache ca-certificates bash libgcc libstdc++
RUN mkdir -p /static/keys RUN mkdir -p /static/keys
COPY --from=builder /go/src/github.com/status-im/status-go/build/bin/statusd /usr/local/bin/ COPY --from=builder /go/src/github.com/status-im/status-go/build/bin/statusd /usr/local/bin/