Can't Install Ghost from Source on container

Hi there,
I have read this tutorial: Ghost Docs
I cloned the repo on my local computer, then I have created a Dockerfile followed by the article above.
dockerfile-ghost

Then, I have built it.
Then, When I run it, it shows the picture below.

And, when I access from my browser, it shows

I want to have my own branch for development
I want to use the Docker container every time I build, So please help me.

Hey there. Because you downloaded the source code version of Ghost you’ll need to download Casper the default theme as well and install it:

Hi there, let me try, thank you.

Hi there, It worked

But, I have seen some issues

And, one more question is I can’t go to /ghost/ Admin panel.

Please give me an explanation for the Ghost front-end errors above and give me an advice to get /ghost Admin panel run on my local computer.

Thank you.

Now you need clone GhostAdmin to core/client dir.

The docs that you linked to explain all of this:

The second command is:

git clone --recurse-submodules git@github.com:TryGhost/Ghost && cd Ghost

It sounds like you did a plain git clone, without submodules. Ghost is made up of more than one part and you need all the parts for it to work.

1 Like

I get close to this now, I think I missed some steps. One question, do I need to change anything from package.json or config.development.json.
Thank you.

1 Like

I maintain a Docker project for Ghost. You might be interested to take a look. It uses all best practices I’m aware of we can do in a Dockerfile + CICD workflow.

  • Use a complexe but easy to follow multi-stage build. This docker image is much smaller. See details below.
  • Use a node-core layer in order to not include npm, yarn, npx and friends in the final docker image
  • Compress node using upx
  • Use tini
  • Use a better config.production.json template. These overide the default one
  • Have curl in the final image to support healthchecks
  • Enhanced unit tests with scanners (Aqua Security, Trivy) when Travis CI does it’s thing
  • Using LABELS based on the opencontainer standard
  • Uninstall the ghost cli to save some space in the final docker image
  • Use npm cache clean --force to safe some space
  • The Docker image is multi-arch ready: AMD64, ARM64, ARM
  • Feature requests are tracked in our issues

The final size is only 74MB.

Sounds great, I will take a look at this and feedback to you soon. Thank you.