undefined reference to `std::__throw_bad_array_new_length()
< /code>
Вот мой Dockerfile
# syntax=docker/dockerfile:experimental
# Builder base image
FROM golang:1.20.1 as builder
# Set a directory to work from
WORKDIR /go/src/github.com/foo/bar
# Install dependencies
RUN dpkg --add-architecture amd64 \
&& apt-get upgrade \
&& apt-get install -y --no-install-recommends gcc-x86-64-linux-gnu g++-x86-64-linux-gnu
# Copy everything in and compile
# There may be cache optimizations we can make
COPY . .
# Some of our dependencies are private, so we need to use SSH to clone them.
RUN git config --global url."ssh://git@github.com/".insteadOf "https://github.com/"
RUN mkdir -p ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
# Build our binary.
RUN --mount=type=ssh GOOS=linux GOARCH=amd64 CC=x86_64-linux-gnu-gcc CXX=x86_64-linux-gnu-g++ make build-go EXTRA_LD_FLAGS="-s -w -extldflags '-dynamic'"
Подробнее здесь: https://stackoverflow.com/questions/766 ... -in-docker
Мобильная версия