Skip to content

Comments

Fix Docker container after adding -latomic#1314

Closed
eric846 wants to merge 4 commits intoenvoyproxy:mainfrom
eric846:docker1
Closed

Fix Docker container after adding -latomic#1314
eric846 wants to merge 4 commits intoenvoyproxy:mainfrom
eric846:docker1

Conversation

@eric846
Copy link
Contributor

@eric846 eric846 commented Mar 13, 2025

In #1309 we added -latomic -lrt, but this caused #1312. The binaries in the Docker image can no longer start, failing to find libatomic.so.1.

apk add libatomic in the Docker container does not work because of unknown Alpine Linux issues.

Instead we now build separate static versions of the Nighthawk binaries, solely for the Nighthawk in Docker.

Statically linking may lead to problems: https://groups.google.com/g/envoy-users/c/XK9M-RhWrxg/m/bgvUqtG2BwAJ.

Confirmed that the static Nighthawk binaries solve the libatomic.so.1 error and apparently fully start:

ci/do_ci.sh docker
...
docker run envoyproxy/nighthawk-dev:latest nighthawk_client
Bad argument: A URI or --multi-target-* options must be specified.

It is worth a try publishing this version, since it can't get worse than the status quo where the Nighthawk Docker image doesn't work.

If the statically linked version fails, another possibility is to switch to Ubuntu as in https://github.com/envoyproxy/envoy/blob/main/ci/Dockerfile-envoy.

Signed-off-by: eric846 <56563761+eric846@users.noreply.github.com>
@eric846 eric846 changed the title apk add libatomic Fix Docker container after adding -latomic Mar 13, 2025
eric846 added 3 commits March 13, 2025 04:17
Signed-off-by: eric846 <56563761+eric846@users.noreply.github.com>
Signed-off-by: eric846 <56563761+eric846@users.noreply.github.com>
Signed-off-by: eric846 <56563761+eric846@users.noreply.github.com>
@eric846 eric846 requested a review from fei-deng March 13, 2025 04:52
@eric846 eric846 marked this pull request as ready for review March 13, 2025 04:52
@zirain
Copy link
Member

zirain commented Mar 13, 2025

@eric846 can you add a check for the CI?

docker run envoyproxy/nighthawk-dev:latest nighthawk_client --help

@eric846 eric846 removed the request for review from fei-deng March 13, 2025 12:59
@eric846
Copy link
Contributor Author

eric846 commented Mar 13, 2025

@eric846 can you add a check for the CI?


docker run envoyproxy/nighthawk-dev:latest nighthawk_client --help

Will find a place to add this. #1317

@eric846
Copy link
Contributor Author

eric846 commented Mar 13, 2025

Now that we have a known-good Ubuntu workaround in #1312, I can try to migrate the container to Ubuntu, which is simpler.

@eric846
Copy link
Contributor Author

eric846 commented Mar 13, 2025

Closing in favor of #1315.

@eric846 eric846 closed this Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants