Sign inSign up

yevgune/octopress_ruby

By yevgune

•Updated almost 2 years ago

Octopress Docker image on top of official image ruby-2.7.8

Image
Developer tools
Web servers
1

215

yevgune/octopress_ruby repository overview

⁠Goal

šŸ“œ a little bit of context.

I have created my blog on Octopress in late 2016. At this time everything worked like a charm. šŸš€

But in from 2022 with major OSX updates I was having much troubles to get working the ruby every time I updated MAC OS or ruby or python or developer tools... šŸ’©

It was painful exercice to debug and fix step by step the dependency issues. 😭

So I decided to create my own docker images.

⁠How to use

  1. in terminal go inside your octopress blog directory
  2. run the following command docker run --volume=$(pwd):/srv -p 4000:4000 -it yevgune/octopress_ruby:5 /bin/bash
  3. now you are inside docker container and you can make bundle exec rake -T to see the commands offered by Octopress
  4. ā— Rake preview and rake watch does not work properly within the docker (I guess some network related issues), but I found a workaround to start the jekyll server manually by running bundle exec jekyll serve --host=0.0.0.0
  5. āœ… now in your host OS (in my case in Mac OS 15.1.1), open your favourite browser and go to http://localhost:4000⁠

⁠Publishing with Rsync šŸ”„

I'm using the rsync method to deploy site on remote server (go prod). And there is some šŸ§™ magic parameters for Docker to securely forward your ssh-agent socket to container

docker run --rm  -v $(pwd):/srv -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock"   -p 4000:4000   -it yevgune/octopress_ruby:5

and once in container, you can run the rsync :

bundle exec rake rsync

⁠Contribution

If you have any question you can join me through the channels proposed by Octopress feedback plugin at https://blog.devatlant.com/blog/2024/12/16/run-your-blog-on-octopress-framework-on-macos-by-using-docker/⁠

Tag summary

Content type

Image

Digest

sha256:33cac8784…

Size

371.4 MB

Last updated

almost 2 years ago

docker pull yevgune/octopress_ruby:5