Closed
Description
This problem has been discovered while investigating:
- Container restarting exit code: 132 #174
- Illegal instruction when using libssl crystal-lang/crystal#15056
The build approach at https://github.com/cloudamqp/amqproxy/blob/main/Dockerfile results in a dynamically linked amqpproxy, but does not ensure the same library version is used at runtime compared to compile time.
It might be the case they match, as https://github.com/84codes/crystal-container-images/blob/main/alpine/Dockerfile defaults to alpine:latest
as well, but it depends on when the builds are run.
Not using the same version at runtime can lead to illegal instruction errors as noted in issue #174 , when using TLS for an upstream host.
For example in our build environment right now:
- Builder image:
- libcrypto3-3.3.1-r3 x86_64 {openssl} (Apache-2.0) [installed]
- libssl3-3.3.1-r3 x86_64 {openssl} (Apache-2.0) [installed]
- Runtime image:
- libcrypto3-3.3.2-r0 x86_64 {openssl} (Apache-2.0) [installed]
- libssl3-3.3.2-r0 x86_64 {openssl} (Apache-2.0) [installed]
Workarounds
- Use
shard build --static
for amqproxy. - Copy libssl/libcrypto from the builder image to the runtime image.
Metadata
Metadata
Assignees
Labels
No labels