Updating OS packages from a Database container

Asked

Viewed 87 times

4

I am redoing a Zabbix server here at the company, where I will upgrade from version 3.2 to 4.0

I’m thinking of using Docker to make life easier, since Dockerhub has images for Zabbix-Server, for Zabbix-Web, and I intend to use the official image of Mysql5.7 as database server.

But here comes the doubt

When I update the OS and Database packages in the Mysql container, it is not simple to move all data from the database, which easily reaches 50Gb to another container.

What would be the most appropriate solution?

  • 1

    I found your question super interesting, so I’ve been talking to a consultant the idea is you map a volume of your database and have only the mysql service running in the container.

  • The idea of the container is exact and to be ephemeral, as already mentioned, the ideal is for you to persist your data in volumes. Then you can write a dockerfile for your scenario (or mount a Docker-Compose) and just go up, to upgrade will also be quiet.

  • I recommend setting up a lab with your background, using the official images as a base and writing a Docker-Compose, persisting your data in volumes, then you will see if it suits your case ;)

  • In the zabixx documentation already has a very detailed how to, and github repository have some examples of Docker-Compose

2 answers

1

You have to work with volumes to save the data outside the container, when it is to update only changes the container image, but the data is the same

0

Exact volumes are the best way to work with sensitive information, but note that if Zabbix components are run within a cluster you need networked volumes (NFS) because containers may not be initialized on the host that has volumes, if it is a simple machine with Docker be happy with the volumes.

This link explains well how to do and with volumes:

http://blog.aeciopires.com/zabbix-docker/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.