railwayapp / nixpacks

App source + Nix packages + Docker = Image
https://nixpacks.com
MIT License
2.33k stars 222 forks source link

Running commands in Python container throws errors for incompatible ldd version #1036

Open mabadir opened 6 months ago

mabadir commented 6 months ago

Is there an existing issue for this?

Describe the bug

We have a python application that builds with NixPacks and working fine for runtime, however trying to execute commands on that container fails because NixPacks by defaults installs an old version of ldd to what is needed to execute commands in the container.

Once the try to execute any command, we get the error:

python: /usr/lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.36' not found (required by /nix/store/jx3kvf6mk8qdaw30dbpngwmgm4p23xdb-libxcrypt-4.4.36/lib/libcrypt.so.2)

To reproduce

  1. Provider: Python
  2. Run: execute any command in the venv inside the container
  3. Throws this error:
    python: /usr/lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.36' not found (required by /nix/store/jx3kvf6mk8qdaw30dbpngwmgm4p23xdb-libxcrypt-4.4.36/lib/libcrypt.so.2)

Expected behavior

No response

Environment

This is the Nixpacks plan

2:08:47 PM: ╔══════════════════════════════ Nixpacks v1.17.0 ══════════════════════════════╗
2:08:47 PM: ║ setup      │ python38, gcc                                                   ║
2:08:47 PM: ║──────────────────────────────────────────────────────────────────────────────║
2:08:47 PM: ║ install    │ python -m venv --copies /opt/venv && . /opt/venv/bin/activate   ║
2:08:47 PM: ║            │ && pip install -r requirements.txt                              ║
2:08:47 PM: ║──────────────────────────────────────────────────────────────────────────────║
2:08:47 PM: ║ start      │ newrelic-admin run-program gunicorn app.app:app -b              ║
2:08:47 PM: ║            │ 0.0.0.0:$PORT -w 3 -k gevent                                    ║
2:08:47 PM: ╚══════════════════════════════════════════════════════════════════════════════╝

The container is deployed to AWS ECS and the command is executed using ECS Execute command feature.

github-actions[bot] commented 6 months ago

Hello, @mabadir! Thanks for your submission.

Our team will respond soon. If you need more immediate help, try our Forum or our Discord. Thanks!