why don't signals work in docker?

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ม.ค. 2025

ความคิดเห็น • 46

  • @maleldil1
    @maleldil1 15 วันที่ผ่านมา +64

    Manually typing the exact same characters in a Dockerfile so you already have it cached is lowkey impressive.

  • @thibautdecombe1975
    @thibautdecombe1975 9 วันที่ผ่านมา +2

    Casually talked about this to a coworker at lunch. He literally faced this issue 2 hours later and was pretty happy we had this little talk. Great timing with your video, and great content as always. Thanks!

    • @anthonywritescode
      @anthonywritescode  9 วันที่ผ่านมา +2

      honestly there's probably years wasted per day waiting for containers to die due to this!

  • @Reecepbcups
    @Reecepbcups 15 วันที่ผ่านมา +20

    You have definitely written a *few* Dockerfiles in your time that was awesome

  • @sillybuttons925
    @sillybuttons925 15 วันที่ผ่านมา +11

    Never knew why I needed dumb init

    • @anthonywritescode
      @anthonywritescode  15 วันที่ผ่านมา +2

      missed you on stream! hope you're doing well

  • @GuyMichaely
    @GuyMichaely 15 วันที่ผ่านมา +3

    Do you have/can you make a video about the non flushing behavior at 2:01? I've never seen that happen with python's print, under what conditions does it not automatically flush?

    • @anthonywritescode
      @anthonywritescode  15 วันที่ผ่านมา +6

      I do! you can search for "line buffering anthonywritescode" and I've got a video on it!

  • @martijnvandebeek6805
    @martijnvandebeek6805 15 วันที่ผ่านมา +1

    I was stuck on this problem at work for a week. Thank you Anthony!

  • @yalnisinfo
    @yalnisinfo 15 วันที่ผ่านมา +2

    i love docker bro, it takes me some time to set it up but it saves so much time and make it reliable to get your services running both locally and in cloud quickly

  • @jeremywang3419
    @jeremywang3419 12 วันที่ผ่านมา

    Good to know! Thanks for sharing!

  • @drinductor8150
    @drinductor8150 14 วันที่ผ่านมา +1

    2:38 any reason not to use heredocs syntax for multiline run commands? My first thought was that it's just a demo, but then I considered maybe you have a good reason to prefer the '&& \' method instead

    • @anthonywritescode
      @anthonywritescode  14 วันที่ผ่านมา +1

      the heredoc syntax is relatively new and I can never remember exactly how it is supposed to work (and being new it's less portable). I know this works (and relatively without downsides) so no reason to change

    • @drinductor8150
      @drinductor8150 14 วันที่ผ่านมา

      ​@@anthonywritescodewhat about exit code propagation? I know the repeated && would make sure all lines are executed or return an error code but I'm not sure about heredocs

    • @anthonywritescode
      @anthonywritescode  14 วันที่ผ่านมา

      sounds like all the more reason for me to stick with `&&`

  • @valtterihuuskonen4207
    @valtterihuuskonen4207 15 วันที่ผ่านมา +6

    I believe Podman uses catatonit while docker uses tini for the --init flag.

    • @anthonywritescode
      @anthonywritescode  15 วันที่ผ่านมา +4

      ahah you got me there, I'm using podman with an alias

  • @bojandimic3914
    @bojandimic3914 15 วันที่ผ่านมา

    Thank you for the content Anthony!

  • @fifamessi007fifamessi00
    @fifamessi007fifamessi00 15 วันที่ผ่านมา +1

    do u have video explain the apt flags u used?

    • @anthonywritescode
      @anthonywritescode  14 วันที่ผ่านมา +1

      I do in fact! (well actually two) -- if you search "apt-get anthonywritescode" there should be one about an intro to apt and another about why I use the particular invocation in docker!

  • @essamgouda1609
    @essamgouda1609 15 วันที่ผ่านมา

    very cool as always !

  • @BrunoBernard-kn6vt
    @BrunoBernard-kn6vt 14 วันที่ผ่านมา

    why there is different init systems for docker ? aren't they similar to dumb-init ?

    • @anthonywritescode
      @anthonywritescode  14 วันที่ผ่านมา

      a bunch of different people solved the same problem in a bunch of slightly different ways!

    • @BrunoBernard-kn6vt
      @BrunoBernard-kn6vt 14 วันที่ผ่านมา

      @ I get your point, maybe i should look into those differences

  • @GilgamoreRed
    @GilgamoreRed 11 วันที่ผ่านมา

    Completely off the wall question(s). Will prettier ever come back to pre-commit? Should it? How do you, or do you leverage it?

    • @anthonywritescode
      @anthonywritescode  11 วันที่ผ่านมา

      there's nothing stopping you from using it -- I'm just done doing free labor for prettier when they keep intentionally breaking it. personally I don't use it

    • @GilgamoreRed
      @GilgamoreRed 10 วันที่ผ่านมา

      @@anthonywritescode Thank you for the reply. It seemed pretty abrupt when it was discontinued. I appreciate all the hard work you put into it. Shame it didn't work out.

  • @husanaaulia4717
    @husanaaulia4717 15 วันที่ผ่านมา

    So the solution is to use dumb init or use bash?

    • @anthonywritescode
      @anthonywritescode  15 วันที่ผ่านมา +1

      any init system will do! bash happens to catch one signal which surprised me!

    • @husanaaulia4717
      @husanaaulia4717 15 วันที่ผ่านมา

      @anthonywritescode thank you, I'll try later

  • @bacon4life
    @bacon4life 15 วันที่ผ่านมา +1

    Nice thumbnail

  • @AmirhessamTahmassebi
    @AmirhessamTahmassebi 15 วันที่ผ่านมา

    nice haricut

  • @jeroenvanrenterghem6163
    @jeroenvanrenterghem6163 15 วันที่ผ่านมา

    Used tini for this.

  • @deadeye1982a
    @deadeye1982a 15 วันที่ผ่านมา +8

    I hate Docker.

    • @janhwillems10000
      @janhwillems10000 15 วันที่ผ่านมา +1

      Why?

    • @krux02
      @krux02 15 วันที่ผ่านมา

      me, too.

    • @krux02
      @krux02 15 วันที่ผ่านมา +1

      @@janhwillems10000 For me it is mostly these three things:
      1. Complicated to learn (needs time and effort to learn and understand)
      2. Adds performance costs
      3. Doesn't solve a problem that I have other than someone else's demand to care for it.

    • @orterves
      @orterves 15 วันที่ผ่านมา +5

      I love docker
      1. it's easy to learn
      2. adds minimal overhead for the benefits it provides
      3. solves multiple problems, such as
      - going from "works on my machine" to production with consistency
      - simplifies experimenting with dependency upgrades
      - providing instant identical dev environments with devcontainers, etc

    • @janhwillems10000
      @janhwillems10000 14 วันที่ผ่านมา +1

      1: Learn it.
      2: That is simply NOT true. (see 1)
      3. That could very well be true; good luck!