Live data from Hacker News

What's new in Docker 1.13: prune, secrets, checkpoints and more

cloudshare.com

21–30 of 62 posts

Re: What's new in Docker 1.13: prune, secrets, checkpoints and more

#21

I'm just a guy that wants to deploy web apps. Is docker overkill for me? Basically, I want to be able to test something on my local machine under the same conditions it will be running on my server. Containerisation seems like the only way to do this that doesn't involve keeping packages and system configurations in sync in two or more systems.

Docker may be overkill to start but it's relatively low cost to implement and it will definitely pay dividends over time:

    * You can be sure that what you're running locally 
      is exactly what you'll be running on the server
    * Your deployment experience will be the same 
      regardless of which tech stack you're using for the 
      web application
    * There are many places you can deploy docker 
      containers (Google GCE, Amazon ECS, Amazon EB, etc.)
    * A web application is often composed of several 
      services (e.g. the web app, a database, redis etc.) 
      and docker compose makes it easy to fire all of 
      those up in development e.g. if a new 
      developer joins, they only need to install 
      docker rather than web app framework + 
      database + redis
    * Docker sets you up quite well to grow into a 
      more complex deployment (e.g. using Kubernetes)

Re: What's new in Docker 1.13: prune, secrets, checkpoints and more

#22
post #4

Looks like there's a mistake about image pruning: "Add -f to get rid of all unused images (ones with no containers running them)." But the option is actually `-a` -- `-f` just simply skips the prompt.

Oops. Thanks for bringing this to my attention. Fixing...

Re: What's new in Docker 1.13: prune, secrets, checkpoints and more

#23
post #15

Earlier quoted context omitted.

What about docker-compose? We've recently started using it, and we don't see any problems; did your colleagues evaluate it?

docker-compose is really straightforward to get running, even moreso with docker-machine, and it gives you dev/prod parity, but the downside is that there's not a built in way to do zero downtime deploys.

Actually with the new docker-compose version 3 you can do rolling updates[1]. 1. https://docs.docker.com/compose/compose-file/#/deploy

Re: What's new in Docker 1.13: prune, secrets, checkpoints and more

#24

Earlier quoted context omitted.

Like this? docker rmi -af I'm a bit confused by the backticks as I use them all the time scripting, but also in Markdown.

I have a gist for it: https://gist.github.com/pubkey/73dcb894cf5f7d262863 #stop and delete all containers docker rm -f $(docker ps -a -q) #delete all images docker rmi -f $(docker images -q)

fwiw, there's a new syntax for this, that is a bit more verbose, but probably worth adopting:

docker container rm $(docker container ls -qa)

docker image rm $(docker image ls -q)

Re: What's new in Docker 1.13: prune, secrets, checkpoints and more

#25

Earlier quoted context omitted.

Like this? docker rmi -af I'm a bit confused by the backticks as I use them all the time scripting, but also in Markdown.

I have a gist for it: https://gist.github.com/pubkey/73dcb894cf5f7d262863 #stop and delete all containers docker rm -f $(docker ps -a -q) #delete all images docker rmi -f $(docker images -q)

This is NOT equivalent. The OP was talking about removing unused images. Your commands remove all images.

Re: What's new in Docker 1.13: prune, secrets, checkpoints and more

#26
Prune seems not that well thought to me. Don't get me wrong, I do find it useful but many people use containers as environments. Think about how many people are going to run prune only to find their work go missing.

If you are gonna add a nuclear button, do it with a big red alert and give the option to whitelist some containers.

Re: What's new in Docker 1.13: prune, secrets, checkpoints and more

#27

Earlier quoted context omitted.

docker-compose is really straightforward to get running, even moreso with docker-machine, and it gives you dev/prod parity, but the downside is that there's not a built in way to do zero downtime deploys.

Actually with the new docker-compose version 3 you can do rolling updates[1]. 1. https://docs.docker.com/compose/compose-file/#/deploy

That doesn't suggest zero downtime though, no? Still needs an LB to know to stop routing to that host for a moment.

Re: What's new in Docker 1.13: prune, secrets, checkpoints and more

#29

Prune seems not that well thought to me. Don't get me wrong, I do find it useful but many people use containers as environments. Think about how many people are going to run prune only to find their work go missing. If you are gonna add a nuclear button, do it with a big red alert and give the option to whitelist some containers.

But that's really what `docker rm` is for, isn't it? I mean, if you want to only delete specific containers, use that. Prune has a specific purpose, which I think is very clear. If you're running the command, you (presumably) know what it should be doing.

I suppose you could argue it might be nice to be able to do something like `docker container prune startsWith*` or something similar. But on the other hand, that functionality is already available -- just use `docker rm` with xargs or something.

Re: What's new in Docker 1.13: prune, secrets, checkpoints and more

#30
post #28

As much as I welcome the CLI cleanup, I can't stop thinking that the 'docker ps -> docker container ls' change makes no sense to anyone who has any experience with bsd/unix/linux systems. Seriously, why?

I agree. It looks like `docker ps` still works so it's nothing to really be concerned about just yet.
Post reply on HN