Giter Club home page Giter Club logo

Comments (4)

jonaslb avatar jonaslb commented on May 24, 2024

Can't reproduce, here it seems sigint causes a typer-based script to close just fine. You're probably not running it right in docker, or you have something else intercepting the signals.

Notably if you use COMMAND with certain images, they are not exec'd like you might expect, but there's some shell that wraps it and doesn't pass on the signals properly. To avoid it, always prefer the array version of ENTRYPOINT, and if you have some init script wrapper, remember to exec python3 (....) when you start your application at the end of it.

from typer.

fakuivan avatar fakuivan commented on May 24, 2024

I'm using entrypoint myself and pointing it to the python script with the appropriate shebang, unless the official python containers from docker are doing something really weird I don't think this is an environment issue

https://github.com/fakuivan/docker-syncthing-system/blob/13efffdfe168260669e1fa3dc6eafc67066708ce/Dockerfile

from typer.

jonaslb avatar jonaslb commented on May 24, 2024

Ok, I can see that you have a 466 line script with a ton of libraries and some threading stuff, too. Usually when submitting a bug to an upstream project, it's a good idea to have a minimal piece of code that demonstrates the issue very clearly. What you have is a "haystack" where you are claiming the "needle" is typer, but I don't really think that's true, or at least it is not demonstrated here in any way.

from typer.

fakuivan avatar fakuivan commented on May 24, 2024

I've had this happen in other private repos where I also use typer, and I know that typer has some handling code for sigint, so I thought I could get some help here. I've tried to isolate to isolate the issue and it seems to be related with docker compose. Even this times out at 10s when running docker compose down:

services:
  alpine-sh:
    image: alpine
    entrypoint: [ "sh", "-c", "while true; do sleep 10; done;" ]

Thanks for the help. I'm closing this, as it doesn't seem to be related.

from typer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.