prysm icon indicating copy to clipboard operation
prysm copied to clipboard

Docker Alpine image do not launch

Open ArchiFleKs opened this issue 4 years ago • 9 comments

🐞 Bug Report

Description

When running latest alpine image I get:

docker run -it prysmaticlabs/prysm-validator:latest-alpine
Error relocating /app/cmd/validator/validator: __memcpy_chk: symbol not found
Error relocating /app/cmd/validator/validator: __memset_chk: symbol not found

Has this worked before in a previous version?

I tried to run the tagged release HEAD-b36509-alpine with the same issue

Yes, the previous version in which this bug was not present was: ....

🔬 Minimal Reproduction

🔥 Error


docker run -it prysmaticlabs/prysm-validator:latest-alpine
Error relocating /app/cmd/validator/validator: __memcpy_chk: symbol not found
Error relocating /app/cmd/validator/validator: __memset_chk: symbol not found

🌍 Your Environment

Operating System: Ubuntu 21.04

Anything else relevant (validator index / public key)? Docker 20.10.7

ArchiFleKs avatar Aug 03 '21 13:08 ArchiFleKs

cc @prestonvanloon Do we still support this?

rkapka avatar Aug 03 '21 16:08 rkapka

I thought these images were fixed (https://github.com/prysmaticlabs/prysm/issues/5768).

This issue looks relevant: https://github.com/bazelbuild/bazel/issues/5891

prestonvanloon avatar Aug 03 '21 19:08 prestonvanloon

Hello, I am hitting this issue while preparing the prysm's hive client image.

Is there a known cause for this or an ETA ?

Many thanks.

marioevz avatar Jun 27 '22 22:06 marioevz

@marioevz this is not actively being worked on. What is required for Prysm's hive client image?

prestonvanloon avatar Jun 27 '22 22:06 prestonvanloon

@marioevz this is not actively being worked on. What is required for Prysm's hive client image?

All clients on hive need to run a configuration shell script before actually launching the client.

Here is prysm's current draft: https://github.com/marioevz/hive/blob/all-cl-clients/clients/prysm-bn/prysm_bn.sh

It seems like the latest docker image for prysm does not contain any of the utilities required to run this script.

marioevz avatar Jun 27 '22 23:06 marioevz

@marioevz For this type of application, I would recommend a workaround of expanding the docker image to include the tools you need.

ARG branch=latest
FROM gcr.io/prysmaticlabs/prysm/beacon-chain:$branch as upstream

FROM debian:buster-slim
COPY --from=upstream /app/cmd/beacon-chain/beacon-chain beacon-chain

ADD prysm_bn.sh /prysm_bn.sh
RUN chmod +x /prysm_bn.sh

RUN /beacon-chain --version > /version.txt

ENTRYPOINT ["/prysm_bn.sh"]

I have created a PR for you here with some fixes. I think it works, but I didn't try it beyond seeing that initial sync would start.

https://github.com/marioevz/hive/pull/1

These alpine images have been long broken and very low priority.

prestonvanloon avatar Jun 27 '22 23:06 prestonvanloon

If anyone needs this in future:

https://gist.github.com/cshintov/645e482ab23ab4c866bba6ea88c49f54

FROM gcr.io/prysmaticlabs/prysm/beacon-chain:v2.1.4-rc.0 as upstream

FROM debian:buster-slim
COPY --from=upstream /app /app

RUN apt-get update && apt-get install -y \
    curl \
    jq \
    nano \
    netcat-openbsd \
    && rm -rf /var/lib/apt/lists/*


STOPSIGNAL SIGINT

ENTRYPOINT ["/app/cmd/beacon-chain/beacon-chain"]

cshintov avatar Aug 04 '22 05:08 cshintov

Can we close this @prestonvanloon ?

rkapka avatar Aug 04 '22 12:08 rkapka

@rkapka I think we only have workarounds for now. The underlying issue still exists. I want to see if we can amend our bazel commands to achieve a result like what @cshintov has provided. I'll take a look this week.

prestonvanloon avatar Aug 04 '22 13:08 prestonvanloon

We are planning to remove support for alpine images following PR #12428.

prestonvanloon avatar May 18 '23 22:05 prestonvanloon

I'm happy with the workaround. But supporting Alpine officially would still be a nice way to allow easier debugging for persons running on K8s for example.

ArchiFleKs avatar May 19 '23 07:05 ArchiFleKs