I have a container that ran and stopped it's processes after build. I'd like to use that state to build on top of it (like using its data from first run). I did it with a MySQL image (hoping the data will be stored) as follows (there are other containers in the compose as well, that is aimed to connect to this MySQL instance):
mysql:
image: mysql-custom
command: mysqld --user=root
environment:
MYSQL_ROOT_PASSWORD: "toor"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
mysql-custom is the commit image that has the data during the first run. Is this possible, to have the data in and build that MySQL instance again with the same data, or am I doing something unacceptably wrong here?