[kwlug-disc] Docker on VPSes

Giles Malet gdmalet at gmail.com
Wed Jan 23 11:03:12 EST 2019


On 2019-01-22 4:14 a.m., Paul Nijjar via kwlug-disc wrote:
> But does it make sense if you are sticking with a standard LAMP configuration on a standard Ubuntu
> install?

I've found that if you can find one (or more) pre-built docker 
containers that have everything you need -- which I'm sure is true for 
LAMP -- then it can be really useful, even if you only run one instance. 
This is because maintainers usually ensure an upgrade consists of 
something like

# docker-compose down
# docker pull <your-mage:latest>
# docker-compose up -d

No messing around with packages on your host, not worrying about 
dependencies that might affect something else. Your host can be really 
stripped down, which is again easier to manage / patch. And the above 
usually takes care of al your networking needs too.

If you want to move the docker instances elsewhere, and are not running 
some fancy control system (Kubernetes?), you can export the images to 
create essentially a tar file, then simply import them on the new host. 
Or assuming you haven't made changes inside the image, you can just 
'docker pull' on the new host, and also move your data -- which needs to 
be done in either case.

Making sure your data is external to the container is usually pretty 
simple, as image maintainers understand this is a requirement, so make 
it easy.

> It might be possible to containerize this application

If you're talking about building your own container from scratch, then a 
lot of the above advantages go away, as you need to maintain the images 
rather than the host, but at least it still keeps things 'contained'. If 
you move to running multiple instances, this can really help though, 
since pushing around a changed container is probably easier than 
modifying multiple hosts.

> why I should trust images that come from hub.docker.com

Maintainers of well known software often maintain their own docker 
images, and store them on the hub. I'm inclined to trust those, but 
maybe not something from some random hacker.

g




More information about the kwlug-disc mailing list