2014-07-27 at

Docker Training


Run it on...

any Linux (kernal version >= 3.8), on...

Repositories / Imaging


Deployment / Production



Bugs

Inconsistent persistence of REPO:TAG metadata

p
There appears to be strange behaviour, only partially fixed, in the persistence of the REPO:TAG meta-data of images, across save and load operations. This.

Volatile configuration warning

Related to this. Currently (docker-1.1.2), if, while in a container, you change something that happens to be in the domain of the config file (e.g. environmental variables), exit the container, and commit the changes to an image(a)... then those changes are lost. Some possible work-arounds:
  1. The "right" way (not always possible):
    • after committing an image(a),
    • docker run [specify config here, e.g. -e HOME=/root/ -e X=123 -e Z=abc] the image(a),
    • then commit it to an image(b).
    • The second image will retain the required configurations.
  2. If you can't (1.) then the emergency method is:
    • after committing an image(a),
    • save the image(a) to a .tar,
    • un-tar(a) it,
    • find the most recent json file,
    • manually tweak the config files,
    • re-tar(b) it,
    • then load back the image(b). (good lord...)
  3. (off topic, but relevant) using .bashrc properly
    • if you're using an image based on one of the public Ubuntu images at Docker Hub,
    • then when you execute docker run OPTIONS IMAGE bash,
    • include -e HOME=/asyoulikeit/...
    • ...and bash will load /asyoulikeit/.bashrc
    • (this is just another way to set up an approach to (1.)

'To-do's

  1. Figure out how AUFS and Docker work, so that backups can be done more effectively, instead of using save for every image.
  2. Figure out port forwarding from host->container, and container->host.

No comments :

Post a Comment