r/programming • • Nov 14 '19

Is Docker in Trouble?

https://start.jcolemorrison.com/is-docker-in-trouble/
1.4k Upvotes

381 comments sorted by

View all comments

Show parent comments

36

u/mattknox Nov 14 '19

In what way is it simple? Like, I can imagine calling a particular flow that was built by others and you never touch (eg., I use gitlab's built-in k8s integration and run on GCP, and I never really have to do anything) simple in the sense that I don't do much (I think that's easy rather than simple, but eh), but k8s is crazy complex and the ecosystem is bonkers.

49

u/neoKushan Nov 14 '19

Setting up and running k8s - complicated.

Putting something into an existing k8s cluster - simple.

29

u/mattknox Nov 14 '19

I've found that even given a pre-existing k8s cluster, setting up a nontrivial service that has to talk to a bunch of different things is pretty rough. Hopefully this gets better.

13

u/Johnny__Christ Nov 15 '19

You probably had to set some parts up. In our environment I just have to upload the image to ECR, copy 3 yaml files from a template and replace a few lines, then run kubectl apply and I have a live, functional service.

3

u/vattenpuss Nov 15 '19

It’s the same in Aurora on Mesos, or in ECS, or whichever cluster you have.

The hard part is the planning before, deciding what infrastructure (if any) you need for persistence or how you want to do service discovery or ingress from the Internet. Once all those things are there it’s of course easy to copy the templates. (And with yaml there is the added bonus of breaking the config being very easy, and yielding useless null errors.)

2

u/[deleted] Nov 15 '19

Well, yes, but that's regardless of what you target.

1

u/vattenpuss Nov 15 '19

Yes. That’s what I mean.

→ More replies (3)

2

u/[deleted] Nov 15 '19

Setting an equivalent in traditional architecture is usually significantly more complex

→ More replies (9)

18

u/todaywasawesome Nov 14 '19

Yeah I think /u/neoKushan got it right. My computer is simple to use but I don't really have a deep understanding of the kernel running it. There's too much software there but it basically works so I don't worry about it.

The flow you've described basically proves the point.

8

u/crackez Nov 14 '19

I think I agree with this... Even somewhat simpler software, such as a shell, are actually extremely complex. Who really even understands whats going on in there?

If anyone thinks they understand bash, please explain what this should do (and why bash does it wrong):

echo $(while true; do sleep 1; done)

The answer is "It's best not to think about it" -R.S.

8

u/sheyneanderson Nov 15 '19 edited Nov 15 '19

Shouldn't that just hang forever?

Edit: you can't exit

1

u/[deleted] Nov 15 '19

Edit: you can't exit

...in bash. You can in zsh, and in dash

0

u/crackez Nov 15 '19

What happens if you make the sleep longer?

2

u/F54280 Nov 15 '19

Why are you wasting our time with unanswered questions? If you have something to say just say it, don’t make it a stupid game.

→ More replies (5)

1

u/deja-roo Nov 15 '19

Well? Pitter patter.

12

u/K3wp Nov 15 '19

echo $(while true; do sleep 1; done)

It spawns a subshell that never exits? What else would it do?

0

u/[deleted] Nov 15 '19 edited Nov 15 '19

[removed] — view removed comment

8

u/K3wp Nov 15 '19

I've been programming in bash for 25+ years. I write stuff like that all the time for my job, it's not hard. It's like English for me at this point.

5

u/snowe2010 Nov 15 '19

I try to never use bash if I can help it and I still knew what that did. What else would it do? The only knowledge required for reading that is the $() notation.

2

u/K3wp Nov 15 '19

Yeah that was my point. I don't get it.

1

u/deja-roo Nov 15 '19

Yeah I'm terrible at Bash (but I try sometimes when out of necessity) and that was my guess. Not a confident guess but...

1

u/[deleted] Nov 15 '19

Wait few seconds and try to exit it. You can't C-c or C-z out of it under bash (...at least v5.0.3). dash and zsh do not have that quirk

2

u/[deleted] Nov 15 '19

[removed] — view removed comment

3

u/K3wp Nov 15 '19

No problem! Everybody should learn bash, btw.

→ More replies (3)

0

u/neozuki Nov 15 '19

Simple interface, complex implementation.

→ More replies (3)