Updating applications inside docker containers (beta 10a)


xusia

Recommended Posts

Hi all, I've got docker running now using the excellent quick start guide on the forums. Here's what happened to me yesterday, followed by a couple of queries:

I got sickbeard running, and it advised me that a newer version was available, so I updated it, restarted the container and was up to the newest version. Then I realised that I had to expose a couple more host directories to the container as volumes. I couldn't find a way of adding another volume without deleting and re-creating the container. Consequently once I re-created the container with the extra volumes I wanted, sickbeard was back to the version in Eric Schultz's image, and the sickbeard database wouldn't open because it had been upgraded to the latest version. So I deleted the sickbeard database files, and was able to restart sickbeard OK then. OK, on to the questions:

 

1. Can you expose an additional host volume to a container without deleting and recreating the container?

2. If I update sickbeard inside its container, can I use "docker commit" to commit the changes so sickbeard stays upgraded permanently?

3. If docker commit can be used, would I then have to launch a local copy of the upgraded container?

4. If I do the upgrades, will everything then fall apart if Eric releases any updates to his images?

 

Thanks.

Link to comment

I have done a bit of study and worked it all out myself. Here is what I found out:

 

1. You cannot expose another host volume to a running container. They all have to be there in the command line on the original "docker run" command.

 

2. If you update say, Sickbeard inside the running container, then you can save the changes permanently using docker commit, but in order to guarantee that you never lose those changes, you then have to use "docker push" to push them up to your own repository. This involves creating an account on the docker hub, and then pushing the image changes to the hub under your own username into a new image after using docker commit to save the container changes. Then if you ever have to delete the container and recreate it, you refer to your new repository when using docker run, instead of "eschultz/docker-sickbeard" - the same will work if you update any of the other apps. I can post a more detailed set of instructions if anyone wants me to.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.