mrz1703 / elrond-node

6 stars 3 forks source link

v1.0.41 Fails to Compile #2

Closed joesixpack closed 4 years ago

joesixpack commented 4 years ago

I think we need access to a Dockerfile and not by pulling an image from the hub. There are some dependencies missing in Alpine for v1.0.41, possibly the latest gcc version.

buildlog.txt

joesixpack commented 4 years ago

Oh, I found it in the hidden. build directory.

joesixpack commented 4 years ago

This seems to work for now:

FROM golang:buster as build

RUN apt update && \ apt upgrade -y && \ apt install -y curl bash mc git make gcc g++

WORKDIR /opt ARG ELROND_VERSION RUN git clone -b ${ELROND_VERSION} https://github.com/ElrondNetwork/elrond-go RUN cd ./elrond-go && \ GO111MODULE=on go mod vendor && \ cd cmd/keygenerator && \ go build && \ cd ../node && \ go build -i -v -ldflags="-X main.appVersion=$(git describe --tags --long --dirty)"

ARG CONFIG_VERSION WORKDIR /opt RUN git clone -b ${CONFIG_VERSION} https://github.com/ElrondNetwork/elrond-config

FROM build WORKDIR /opt/app RUN apt install bash coreutils COPY --from=build /opt/elrond-config/ /tmp/config/ COPY --from=build /opt/elrond-go/cmd/keygenerator/keygenerator /opt/elrond-go/cmd/node/node /opt/app/ RUN ln -s /opt/app/node /usr/local/bin/ && \ ln -s /opt/app/keygenerator /usr/local/bin/

COPY entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] CMD ["node", "--use-log-view"]

mrz1703 commented 4 years ago

I updated the repository. Please check out README. Unfortunately, I could not leave alpine, because the problem that occurs when building the application can only be solved by the Elrond developers themselves (the poor thing is to hope that they will fix it). In any case, I left a copy of the Dockerfile in the .build folder for alpine.

If you have problems, you can reopen issue.