Huginn: updating the docker image

Created on 17 Apr 2016  路  5Comments  路  Source: huginn/huginn

I have a docker based instance of huginn running on my server.

How do i update the image. I mean, If i do a "docker pull" will that remove the existing and initialize an new on?..

What is the official method of updating docker images.

Most helpful comment

Yes, Thanks for this @dsander .. I was running an instance which did not have mysql volume exported..
@johnnyzen
This is what i did

  • Take a backup -- docker export -o ~/huginn.tar
  • Find the volume for the current huginn image -- use docker inspect " and find the fs path for the container
  • do an rsync of the volume to a directory on the docker_host (i used: rsynv -avp ..)
  • stop the container -- docker stop
  • remove the container -- docker rm
  • get the latest code -- docker pull
  • Instantiate a new container with the latest code -- docker exec -v "<>":/var/lib/mysql

    • I passed several environment variables like

-e DO_NOT_SEED=1 \
-e APP_SECRET_TOKEN="<>" \
-e TWITTER_OAUTH_KEY=<> \
-e TWITTER_OAUTH_SECRET=<> \
-e TIMEZONE="<>" \

Hope this helps

All 5 comments

I would love to know this too :)

docker pull will only update your local huginn image. To update the container your need to run docker stop, docker rm, and docker run to create a new container based on the updated image. Keep in mind that this will remove the data inside the old huginn container, when you are not using a linked database or exported the data using a volume.
When you are using docker-compose this will update to the latest version:

docker-compose stop
docker-compose pull
docker-compose up -d

Yes, Thanks for this @dsander .. I was running an instance which did not have mysql volume exported..
@johnnyzen
This is what i did

  • Take a backup -- docker export -o ~/huginn.tar
  • Find the volume for the current huginn image -- use docker inspect " and find the fs path for the container
  • do an rsync of the volume to a directory on the docker_host (i used: rsynv -avp ..)
  • stop the container -- docker stop
  • remove the container -- docker rm
  • get the latest code -- docker pull
  • Instantiate a new container with the latest code -- docker exec -v "<>":/var/lib/mysql

    • I passed several environment variables like

-e DO_NOT_SEED=1 \
-e APP_SECRET_TOKEN="<>" \
-e TWITTER_OAUTH_KEY=<> \
-e TWITTER_OAUTH_SECRET=<> \
-e TIMEZONE="<>" \

Hope this helps

thanks @vijayrajah thats very kind of you to write that up :)

I believe that this issue has been resolved and can be closed -- not sure who closes it though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johnnyzen picture johnnyzen  路  6Comments

HyShai picture HyShai  路  9Comments

xnaas picture xnaas  路  7Comments

feilongfl picture feilongfl  路  3Comments

knu picture knu  路  9Comments