The process was fairly easy. I would recommend trying it out locally first.
Start with pulling the new image:
docker pull ghost or if you want the smaller image
docker pull ghost:alpine.
Run it on your computer:
docker run --name ghostv1 -v /path/to/data:/var/lib/ghost/content -p 2369:2368 -d ghost
contentPath has changed to
Exporting and importing the old data worked just fine. Remember to backup your old data from
/content/ and perhaps the
ghost.db just to be sure.
Also the name of the config file has changed so for production just move or copy your
Start up your new container:
docker run -d --name ghost -v /path/to/data:/var/lib/ghost/content \ -e NODE_ENV=production -e url=YOUR_URL -p 2368:2368 ghost
On my first run I got a migration error from the container:
Error occurred while executing the following migration: 2-create-fixtures.js
Google wouldn't help me so my brute solution was to remove the old
/data/ghost.db since I had no use for it anyway.
Note: The environment variable (ghost uses lowercase ones for some reason)
-e url=YOUR_URL was necessary, otherwise all internal links on the blog would point to
After that all I had to do was to visit the blog, create my user again, import the JSON data and change to my theme!
The container script creates a couple of default posts, to remove all of them just delete the Ghost user in the settings (