-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how far are we from just using Docker in prod #5
Comments
Advantages of containerizing :
Drawbacks :
About the logs, docker logs can also be accessed by |
some reading in the links https://dan.hersam.com/2020/11/06/local-docker-port-exposed/ |
some more readings/propaganda https://docs.docker.com/engine/security/
|
https://sandbox.inventaire.io is now running on a rootless docker engine, which is briefly documented here |
This shouldn't be a problem nowadays? Besides, most modern deployments are either local/small deployments (so having small DB isn't problematic) or large, clustered deployments with dedicated database machine?
Shouldn't security be handled outside, i.e. on the host machine of the docker or better yet, on the external LB/firewall? Docker/machine with deployed container should only deal with maintaining container up and running and the image itself should be concerned with only serving the request, nothing more?
This is relatively trivial, you can either have data inside docker volume or expose it to host machine (so it's easier to migrate elsewhere and it's more resilient/persistent)
Most of the time in production logging should be minimal either way? :-) |
First, let's remind ourselves why Docker is attractive for our use-cases:
It makes re-using a given version of a software much easier, in a way that is very independent from the host OS. For instance, in our case, relying on
apt-get
to install CouchDB meant for a while being blocked onv1.6.1
, while that was a version with publicly known security breaches. Now that means being blocked on CouchDBv3.1.0
, and not having a package for the recently released Ubuntu 20.04 LTS. Docker allows to install any version of CouchDB, on any OS where Docker can be installed. That's an undeniable advantage over just relying onapt-get
or equivalent.It could offer a standardized deploy recipe format. Unfortunately, this potentially has proved to be difficult to use so far, as one has to either:
The problem: Docker and network security
ufw
is a beautifully simple abstraction layer on top ofiptables
: once you have setufw default deny incoming
, you can trust that any port that isn't whitelisted isn't accessible from the outside world. It works awesome as long as all the services just bind to a port and don't care further about network. Unfortunately, Docker messes directly withiptables
, making those all the previous assumptions void. It is possible to disableiptables
manipulation, but it comes with a dose of undocumented fear, uncertainty and doubts: "this option is not appropriate for most users [...]. Setting iptables to false will more than likely break container networking for the Docker engine." [Edit: after testing locally, setting/etc/docker/daemon.json
to{"iptables": false}
, network requests where just not getting out anymore, so that's definitly having an undesired effect]Possible solutions
iptables
withoutufw
, to have a reliable setup where we can have a high level of trust that Docker isn'tWhat we would lose with Docker
ufw
simplicity, as described abovedocker logs
, but it's not as good asjournalctl
and we would need to reimplement logs backup for this new setupThe text was updated successfully, but these errors were encountered: