Docker file
FROM golang:1.13 AS builder
RUN go get github.com/pin/tftp
when building the image getting following error is there a workaround for this
~$ docker-compose build
Building xxxx_yyyy
Step 1/48 : FROM golang:1.13 AS builder
---> d6f3656320fe
Step 2/48 : RUN go get github.com/pin/tftp
---> Running in 63eb460130f5
# golang.org/x/sys/unix
src/golang.org/x/sys/unix/mremap.go:42:10: undefined: unsafe.Slice
src/golang.org/x/sys/unix/syscall.go:83:16: undefined: unsafe.Slice
src/golang.org/x/sys/unix/syscall_linux.go:1018:20: undefined: unsafe.Slice
src/golang.org/x/sys/unix/syscall_linux.go:2300:9: undefined: unsafe.Slice
src/golang.org/x/sys/unix/syscall_unix.go:118:7: undefined: unsafe.Slice
src/go
lang.org/x/sys/unix/sysvshm_unix.go:33:7: undefined: unsafe.Slice
ERROR: Service 'xxxx_yyyy' failed to build: The command '/bin/sh -c go get
~$
Wanted to try this workaround but dontknow how to do in Docker
I tried to use a go 1.18 version that had another problem Docker file
FROM golang:1.18 AS builder
RUN go install github.com/pin/tftp@latest
Building xxxx_yyyy
Step 1/49 : FROM golang:1.18 AS builder
---> c37a56a6d654
Step 2/49 : RUN go install github.com/pin/tftp@latest
---> Running in 3c1d893b0384
go: downloading github.com/pin/tftp v2.1.0+incompatible
package github.com/pin/tftp is not a main package
ERROR: Service 'xxxx_yyyy' failed to build: The command '/bin/sh -c go install github.com/pin/tftp@latest' returned a non-zero code: 1