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!
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?
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
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
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
@@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
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!
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
@@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.
@@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.
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
Manually typing the exact same characters in a Dockerfile so you already have it cached is lowkey impressive.
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!
honestly there's probably years wasted per day waiting for containers to die due to this!
You have definitely written a *few* Dockerfiles in your time that was awesome
too many!
Never knew why I needed dumb init
missed you on stream! hope you're doing well
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?
I do! you can search for "line buffering anthonywritescode" and I've got a video on it!
I was stuck on this problem at work for a week. Thank you Anthony!
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
Good to know! Thanks for sharing!
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
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
@@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
sounds like all the more reason for me to stick with `&&`
I believe Podman uses catatonit while docker uses tini for the --init flag.
ahah you got me there, I'm using podman with an alias
Thank you for the content Anthony!
do u have video explain the apt flags u used?
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!
very cool as always !
why there is different init systems for docker ? aren't they similar to dumb-init ?
a bunch of different people solved the same problem in a bunch of slightly different ways!
@ I get your point, maybe i should look into those differences
Completely off the wall question(s). Will prettier ever come back to pre-commit? Should it? How do you, or do you leverage it?
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
@@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.
So the solution is to use dumb init or use bash?
any init system will do! bash happens to catch one signal which surprised me!
@anthonywritescode thank you, I'll try later
Nice thumbnail
nice haricut
Used tini for this.
I hate Docker.
Why?
me, too.
@@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.
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
1: Learn it.
2: That is simply NOT true. (see 1)
3. That could very well be true; good luck!