virtualization - docker container / image not saving changes -




i pulled mysql docker(latest) & after running trying commit container after adding data & new schema's & tables in mysql docker instance.

for reference following link -> http://www.servermom.org/pull-docker-images-run-docker-containers/3225/

but after trying multiple variations not achieving intend to. doing after adding new tables , schema container committing & pushing docker hub mentioned in link.

after deleting deleting 1st pulled image have added new data container , committed new image different tag .. deleting 1st pulled image. (the reason doing because lets if changing machine can data intact when docker pull of committed image)

just git if commit & push , lets machine broke down in new machine have git pull , without loss. not able understand how why docker not saving changes

data mysql image stored in volume. means files inside volume not part of image, stored on host , assigned 1 or more running containers.

to achieve want see 2 options:

1) build custom mysql image, change storage path of mysql outside of volume (or create new mysql image without volumes).

2) can extend image , include schema modification commands @ container startup custom run script/entrypoint

here documentation page volumes: https://docs.docker.com/engine/admin/volumes/volumes/





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -

python - Read npy file directly from S3 StreamingBody -