So how do you handle what she addressed under secrets? How do you share passwords between containers? For quick and dirty stuff, I use environment variables that are set in my docker-compose file, but I have no experience running docker in production.
Some questions about Docker and rkt
41–50 of 92 posts
Re: Some questions about Docker and rkt
#42"Installing stuff on computers so you can run your program on them really sucks. It's easy to get wrong! It's scary when you make changes! Even if you use Puppet or Chef or something to install the stuff on the computers, it sucks." I think a lot of people feel this way. I think that fear is born of ignorance, and we should fix that. Let's say you are working on an application in NewPopularLanguage 2.3.1, using CoolF…
This should be common sense because if you build servers/containers at different points in time, it's possible to have 4-5 different versions of libxyz in use depending on when that instance was spun up.
However, if you're writing code in Ruby, Python, Node, Go, or even Java, you're using a version manager for the base interpreter (e.g. rvm, rbenv, conda, etc) because the distribution-packaged version is typically a year behind, or not present at all.
Then you're using the language's package manager (Rubygems, PIP, npm, go get, mvn) to install packages.
Then a lot of these framework maintainers are bundling the necessary libraries with their package for consistent builds (e.g. nokogiri on Ruby, libv8 on Ruby, etc).
You're also making the assumption that the CoolFramework use things like autoconf/automake (which generally has the reputation nowadays of being "bloated") for enabling consistent compilation across OS variants.
It's hard to maintain explicit versions in separate locations when a typical web application nowadays has at least 100 dependencies, and the typical web site has several components (the web app, a queue, a scheduler, maybe some separate workers).
This all sounds great in theory, but I feel it is very hard to maintain in practice with a fast moving ecosystem, which almost all of the above languages are.
Re: Some questions about Docker and rkt
#43"Installing stuff on computers so you can run your program on them really sucks. It's easy to get wrong! It's scary when you make changes! Even if you use Puppet or Chef or something to install the stuff on the computers, it sucks." I think a lot of people feel this way. I think that fear is born of ignorance, and we should fix that. Let's say you are working on an application in NewPopularLanguage 2.3.1, using CoolF…
Re: Some questions about Docker and rkt
#44"Installing stuff on computers so you can run your program on them really sucks. It's easy to get wrong! It's scary when you make changes! Even if you use Puppet or Chef or something to install the stuff on the computers, it sucks." I think a lot of people feel this way. I think that fear is born of ignorance, and we should fix that. Let's say you are working on an application in NewPopularLanguage 2.3.1, using CoolF…
Exactly. You have to be fucking careful. Or you can just use a container. That's his point.
> I think that fear is born of ignorance, and we should fix that.
Actually I think it's born from having a lot of experience of installing things and it being a total nightmare..
You're right, obviously we should stick to packaged versions of libraries whenever possible, but as you say, it is not always possible.
Re: Some questions about Docker and rkt
#45I will try and answer networking question. At scale a single host can be running may be 20 containers and port collision becomes a real problem. So imagine if a container opened a port directly on host -we have to be careful that they don't step on each other toes. Even if all containers used some sort of contract about which port they are going to use - there are all sort of corner cases waiting to happen such as ep…
It is perfectly ok if you have lots of IPs to put routed IPs on the `docker0` bridge, and never use port publishing at all, or to use some of the other optional setups, such as the new macvlan and ipvlan setups https://github.com/docker/docker/blob/master/experimental/vl... which are the kind of production setups you may want if you run your own networking. But Docker cannot assume anything about the network setup in the default configuration, hence the use of published ports, which is kind of inconvenient but always works in any environment.
Re: Some questions about Docker and rkt
#46So how do you handle what she addressed under secrets? How do you share passwords between containers? For quick and dirty stuff, I use environment variables that are set in my docker-compose file, but I have no experience running docker in production.
Re: Some questions about Docker and rkt
#47You shouldn't directly use "docker run" in production. At least not yet.
Think of the docker binary and daemon as development tools not a production platform.
Develop your apps one process per container, microservice style. If you can't do that you should probably use vms.
When it comes time to deploy, kubernetes handles scheduling for you automatically across your fleet.
Kubernetes secrets can be mounted inside the containers so you don't leak them like you can with env vars.
Kubernetes will eventually support other runtimes like rkt. But this abstracted away.
Kubernetes assumes a flat networking space, but this is taken care of with stuff like flannel.
You should probobly use Dockerfiles to create containers in your build process. Packer can create them but I would only reccomend that way if you have other tooling that does that. Spinnaker can leverage that bake-centric stuff very nicely.
Re: Some questions about Docker and rkt
#48Re: Some questions about Docker and rkt
#49While this thread has visibility, I am curious about your typical security model with docker. From my experience, whoever is running docker seems to be able to run root commands on the host [1]. So any best practices for running docker ? [1] http://reventlov.com/advisories/using-the-docker-command-to-...
Correct me if I'm wrong, I'm interested to know? I'm currently looking into docker and the advantages it brings to deployment instead of using a VM.
Re: Some questions about Docker and rkt
#50* Better developer environment. Actually, I'm not sure anymore. It totally makes sense for testing (all the CI/CD stuff), and - thanks to the packaging aspect - it's easy to set up external dependencies (like databases), but I just wasn't able to grasp how the actual development is better with Docker. Developers tinker with stuff, containers and images are all about isolation and immutability, and those stand in one's way.
* PID1. Obviously, isolation is the cause for this. With `--pid=host` it's gone, but no one does that, probably because of nearly complete lack of UID/GID management, thus the security drawbacks. I guess, it has roots in "all hosts are the same" idea, as UID/GID have to be a shared resource and they're harder to manage than just spawning things into a new PID namespace so processes won't mess with each other.
* Networking. Yes, as it was pointed out, it makes sense due to port conflicts, but usually it's inferior over-complicated version of moving port numbers to environment variables. Instead of binding your httpd to [::]:80 and setting up port mapping, bind it to [::]:${LISTEN_PORT:-80}. All the same stuff, but - IMHO - much more straightforward. Sure, there are (somewhat unusual) cases where separate network namespace is a necessity (or just a good thing), but I don't think they're any common.
So, I think, the question is also: is there (and why) the need for isolation in a way Docker does it? Doesn't the way it does unnecessarily complicate things?