Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry does not install packages in docker entrypoint when tty is activated #8230

Closed
4 tasks done
hochstibe opened this issue Jul 24, 2023 · 3 comments
Closed
4 tasks done
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@hochstibe
Copy link

hochstibe commented Jul 24, 2023

  • Poetry version: 1.5.1
  • Python version: 3.10.12 (slim-buster image)
  • OS version and name: Debian GNU/Linux 10 (buster)
  • pyproject.toml: pyproject.toml
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

I need to install some dependencies in the entrypoint of my docker container. The main dependencies are installed when building the image, some additional packages (groups) are installed later. For a colored logging output, I activated tty: true in my docker-compose.

Problem:
poetry install in a docker entrypoint script does not install the packages. It detects, that some packages need to be installed (Package operations: 3 installs, 0 updates, 0 removals), but it does not install them. There is no error message (even not in verbose mode). poetry show lists them as red.
Entering the running container, it is possible to install the missing packages.

When deactivating tty (default) in docker-compose, it installs the packages in the entrypoint.

To reproduce, i set up a repository with

  • pyproject.toml
  • dockerfile
  • entrypoint
  • docker-compose

Running docker-compose up -d --build and checking the logs of the 2 containers (docker compose logs test_poetry1 tty with failed install and docker compose logs test_poetry2 with correct install)

@hochstibe hochstibe added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jul 24, 2023
@dimbleby
Copy link
Contributor

presumably duplicate #7184

@hochstibe
Copy link
Author

Setting the --no-ansi flag in the entrypoint solves the problem (as written in #7184 )

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants