Did anyone know of a docker container where in it’s possible to update ghost 1 to ghost 2? I have a JSON export from ghost 1 and my new ghost 2 is already installed. So i need to import my json into a temporary ghost 1, upgrade to ghost 2 and export in ghost 2 json format.
Alternatively perhaps somebody wrote a script to update the json file directly. But i prefer the to go the official route.
I tried myself with the 1-alpine container but even though the upgrade seems to go well on the command line, when i refresh the admin area of the webpage i still get the ghost 1 environment.
The commands i tried are as follows:
sudo docker run -d --name ghost1 ghost:1-alpine
sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ghost1
setup ghost at: http://<.. ip in previous step ..>:2368/ghost/
sudo docker exec -it ghost1 /bin/bash
su-exec node ghost update
exit
sudo docker restart ghost1
I noticed that ghost (node) can not be restarted by ghost-cli because it’s PID 1 in the docker container ghost/Dockerfile at 4792c91799bca4e41a5f8439cf068f05e2341662 · docker-library/ghost · GitHub
But the upgrade seems to be going well except that port 2368 can not be reused.
Perhaps this is not the best container to try this with. I’m open to suggestions because i don’t feel like installing a system myself just to upgrade a json.