• Stars
    star
    111
  • Rank 312,487 (Top 7 %)
  • Language Makefile
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ghost Blog on Docker - Dockerfile for ARM etc

ghost-on-docker

Ghost

Pair Docker and Ghost for the perfect platform to run your blog!

Find out more about Ghost here

Ghost is an elegant and minimal blogging platform that focus on simplicity. One of its most attractive features is its Markdown editor. It's also fully hackable running on Node.js with the Handlebars view-engine.

This project is work-in-progress but all the blog images are fully working

Ghost 1.0

Ghost 1.0 was released in July 2017 you can find the Dockerfile here and a Getting Started blog post here.

For now I'd still recommend using Ghost 0.11.x which has better support for running in Docker under a known configuration. Check back soon for more on Ghost 1.0.

Ghost 0.11.x

The rest of these instructions are for the version of Ghost running at https://blog.alexellis.io and many other sites.

Getting started

You can pull the ARMv7 image (for PI2/3) straight from the Docker Hub docker pull alexellis2/ghost-on-arm:armv7. The image for your PC, laptop or cloud host is - alexellis2/ghost-on-docker:latest.

To get the latest and greatest versions you can build your own image using the Dockerfile provided. If you'd like to help maintain or test new versions please do so through pull requests.

Please support the project by giving it a Star.

Dockerfiles

These are all based upon Node 4.x, pick the architecture for your computer/server. If you are using a regular PC it will be the first option marked x86_x64. Each image has been pushed to the Docker hub, the npm modules alone for Ghost take up around 500MB, but the download will be faster than a fresh build if you use a Raspberry PI.

  • Regular PC/Laptop - x86_x64
  • Dockerfile
  • Based upon Alpine Linux
  • Very fast build time and high amount of requests/per second compared to a Raspberry PI, my Core i5 NUC with 16GB RAM running a single container gave around 85-90 requests/per second.

Example usage:

$ docker run --name blog -d -p 80:2368 alexellis2/ghost-on-docker:latest

Or use the recently added Docker Compose file for even less fuss:

$ docker-compose up -d
  • ARMv7 (Raspberry PI 2 / 3)
  • Dockerfile
  • Building SQLite npm module on PI 2 takes about 7 minutes
  • semver and other required modules will take quite some time
  • Once up and running can handle 12-16 requests per second
  • Nginx is beneficial as a cache (dramatically improving requests/per second), but not absolutely necessary.

Example usage:

$ docker run --name blog -d -p 80:2368 alexellis2/ghost-on-docker:armv7
  • ARMv6 (Raspberry PI A/B/B+/Zero)
  • Dockerfile
  • Note: ARMv6, especially models with < 512mb RAM will require a swapfile for building the SQLite npm module. Creating SWAP file
  • Building SQLite npm module on PI Zero takes about 16 minutes
  • Once up and running performs 2-3 requests per second, use of Nginx or another cache is highly recommended.

Example usage:

$ docker run --name blog -d -p 80:2368 alexellis2/ghost-on-docker:armv6

Benchmarking

One of the simplest ways you can benchmark your blog is to use Apache Bench. It has a very simple CLI, here's an example load:

On the Docker host:

$ docker run --name blog -d -p 80:2368 alexellis2/ghost-on-docker:latest
5c71cdf984fefc7b508e8ee0f0d82c389ee492a339f7df23be95a61e83340156

From another PC:

$ ab -c 4 -n 1000 http://192.168.0.240/
  • -c 4 means 4 concurrent requests, simulating three users hitting the page at exactly the same time
  • -n 1000 means 1000 requests, so each of the 4 users will hit the page a portion of that time. i.e. 250 requests each.

You can play with the numbers to see how the blog performs under different conditions, you could also try typing in docker stats to see what kind of load the Docker container is creating.

Taking it further

  • Learn how to apply caching on your blog with NGinx.

Boost your site's performance and save money with NGinx

  • Use Docker volumes to safely upgrade your blog and preserve your data

Keeping Shipping your blog with Docker volumes

There is also an example docker-compose.yml file in this repository which you can use as a template for mounting a persistent volume.

Questions/comments?

Head over to my blog and post a comment/question, or if you've found a bug raise an issue on Github.

See also:

Just want to learn Docker?

Start learning today with a dozen progressive labs with my Hands-on Docker tutorial

How I self-host my blog for free

Self-hosting on a Raspberry PI

How I use dynamic DNS for alexellis.io

More Repositories

1

k3sup

bootstrap K3s over SSH in < 60s πŸš€
Go
5,267
star
2

arkade

Open Source Marketplace For Developer Tools
Go
3,546
star
3

awesome-baremetal

Bare-metal is awesome. Let's share our favourite tools.
1,424
star
4

k8s-on-raspbian

Kubernetes on Raspbian (Raspberry Pi)
Shell
881
star
5

docker-arm

Build Docker and Swarm on an ARM SoC like the Raspberry Pi
Shell
875
star
6

derek

Reduce maintainer fatigue by automating GitHub
Go
790
star
7

growlab

A global contest to grow and monitor your own food with Raspberry Pi
Python
441
star
8

HandsOnDocker

Get hands-on with Docker through a dozen self-paced and progressive labs.
C#
438
star
9

mine-with-docker

Mine cryptocurrencies with Docker containers and get paid in Bitcoin (BTC)
308
star
10

registry-creds

Replicate Kubernetes ImagePullSecrets to all namespaces
Go
306
star
11

jaas

Run jobs (tasks/one-shot containers) with Docker
Go
303
star
12

firecracker-init-lab

Build a Firecracker microVM from a container image
Shell
179
star
13

expressjs-k8s

Express.js microservice with a Dockerfile, Kubernetes YAMLs and a non-root user
JavaScript
165
star
14

run-job

Run a Kubernetes Job and get the logs when it's done πŸƒβ€β™‚οΈ
Go
162
star
15

spotminer

Golang automation for mining cryptocurrencies on the Spot Market
Go
161
star
16

docker-blinkt-workshop

Get into physical computing with Docker and Raspberry Pi
Python
152
star
17

go-execute

Automate CLI commands with Go
Go
134
star
18

k8s-tls-registry

Setup a privateΒ Docker registry with TLS on Kubernetes
90
star
19

openfaas-puppeteer-template

OpenFaaS template for headless Chrome and Puppeteer
JavaScript
90
star
20

civo-fluxcd-expressjs

FluxCD and Express.js GitOps tutorial for Civo
82
star
21

hash-browns

Generate SHA256 hashes in Go with Prometheus metrics
Go
76
star
22

rodak

Build your own Rodak - portable Kodak Brownie powered by Raspberry Pi
Python
72
star
23

phototimer

A smart time-lapse driver for Raspberry Pi using raspistill
Python
69
star
24

leaderboard-app

GitHub leaderboard for your organisation or repo (Serverless SPA)
Go
67
star
25

raspberrypi-youtube-streaming

Stream straight to YouTube from your Raspberry Pi with Docker.
Shell
63
star
26

quickstart-prometheus

Quickstart for Prometheus
62
star
27

faas-containerd

containerd and CNI provider for OpenFaaS
Go
61
star
28

aspnet-voteservice

Windows Containers for Docker Voting App
JavaScript
60
star
29

helm3-expressjs-tutorial

Guide to Helm 3 with an Express.js microservice
58
star
30

cli-progress-animation

Coloured progress-bar for your Golang CLI
Go
56
star
31

swarmmode-tests

Series of test cases for Docker swarmmode
JavaScript
56
star
32

mongodb-function

OpenFaaS Function that makes use of a connection pool to access MongoDB
JavaScript
53
star
33

async-example

Asynchronous patterns in Node.js by example: async.waterfall/series/queue
JavaScript
52
star
34

href-counter

Golang multi-stage build to count links within a page for SEO
Go
52
star
35

faas-dockercon

Functions for Dockercon
JavaScript
49
star
36

tensorflow-serving-openfaas

Example of using TensorFlow Serving with OpenFaaS
Dockerfile
47
star
37

pizero-docker-demo

Live IoT cluster demonstration
Shell
46
star
38

jenkins2docker

Jenkins 2.x recipe with docker-compose
44
star
39

enviro-dashboard

Environmental monitoring (with Raspberry Pi sensors) and InfluxDB/Grafana
Python
43
star
40

blinkt_go_examples

The beginning of Blinkt examples programs in Go
Go
37
star
41

funker-dispatch

An API Gateway for serverless functions on Docker Swarm (deprecated, see: openfaas.com)
JavaScript
37
star
42

pi_zero_stock

PI Zero Stock tracker in Node.js with Redis back-end to cache results
HTML
36
star
43

minio-gauge

A Minio pressure gauge with the Raspberry Pi and Blinkt! from Pimoroni, see in real-time how busy your S3 cloud storage is
Python
36
star
44

dockerlabs

Moved to Hands On Docker, click for details.
35
star
45

sponsors-functions

GitHub Sponsors webhook receiver and Discord forwarder
JavaScript
33
star
46

openfaas-streaming-templates

Stream data from ffmpeg/Node.js/Bash over HTTP with OpenFaaS
Dockerfile
32
star
47

fstail

Scan a directory for changed files and tail them
Go
32
star
48

upload-assets

GitHub Action to upload multiple assets to a release
JavaScript
31
star
49

twitter-bots

Learn to create Twitter bots by example.
JavaScript
30
star
50

kubernetes-todo-go-app

A TODO API for Kubernetes written in go
Go
30
star
51

blinkt_go

A Golang library for the Pimoroni Blinkt!
Go
28
star
52

sshdkit

Example for building a bootable SSHD system with LinuxKit
Shell
28
star
53

crud-postgresql-nodejs-openfaas

Build a CRUD API with Postgresql and Node.js with OpenFaaS
28
star
54

gumroad-custom-workflow

Get webhooks in Slack every time you sell a product on Gumroad
JavaScript
27
star
55

seeds2

A Python application for live tweeting photos of your seeds growing on your Raspberry Pi.
Python
26
star
56

iot-sensors-mqtt-openfaas

Collect, plot and analyse sensor readings from your IoT devices with OpenFaaS
Python
26
star
57

hmac

Validate hmac signatures in Go
Go
26
star
58

2020

Make your own 2020 ASCII art
JavaScript
26
star
59

minikube-operator

An operator for Minikube - Kubernetes on Kubernetes
Go
25
star
60

function-storage-example

Serverless Functions storage tutorial with Minio and OpenFaaS
Python
25
star
61

inlets-connect

A tiny HTTP CONNECT proxy 🚦
Go
23
star
62

guidgenerator-aspnet

Build and deploy an ASP.NET WebAPI application with traditional .NET on Windows with Docker
JavaScript
23
star
63

containerd-arm

Arm64 & armhf binaries of containerd
22
star
64

faas-twitter-fanclub

Serverless polaroids - posted to Twitter for GitHub stars
Python
22
star
65

inlets-heroku-tutorial

Run inlets on Heroku to tunnel local endpoints for free
Dockerfile
21
star
66

mkaas

mkaas: minikube on Kubernetes with CRDs
Go
21
star
67

datacenter-sensor

Sensors for the datacenter to protect against intruders and high temperatures
JavaScript
20
star
68

windowscontainers-jenkinsci

Windows Containers PoC for Server Core
20
star
69

repaint-the-past

Full instructions for repainting the past
Python
19
star
70

nicehash-overwatch

Keep an eye on your stats with the Nicehash mining pool
JavaScript
19
star
71

zumopi

Zumo robot control code for Raspberry PI and Wiimote
Python
18
star
72

comment-vibes

OpenFaaS CRUD sample with a Postgres backend and GitHub emojis as input.
Go
16
star
73

alexa-demos

Series of demos for the Amazon Alexa service
JavaScript
14
star
74

alexa-blinkt

JavaScript
14
star
75

tinkerbot

ChatOps for Tinkerbell
Go
13
star
76

PlanningPoker

PlanningPoker for estimating story points in SCRUM
HTML
13
star
77

mqtt-to-s3

mqtt-s3-example
Python
13
star
78

express-middleware-sinon

Express middleware with Sinon testing
JavaScript
13
star
79

lambda-on-openfaas-poc

A PoC for running Lambda functions unmodified on OpenFaaS
Go
12
star
80

multiarch-templates

Multi-arch templates for OpenFaaS
JavaScript
12
star
81

workflow-yaml-template

Rudimentary YAML workflow runner for OpenFaaS
Go
12
star
82

minty

Minting OIDC tokens from GitHub Actions for use with OpenFaaS
Go
11
star
83

release-it

CI example from Everyday Golang
Makefile
10
star
84

goto

My URL shortener
JavaScript
10
star
85

github_counter_faas

Example FaaS stack for Raspberry Pi (ARM) to integrate with Github events.
Python
10
star
86

webhook-tester

I just use this repo for testing Github integrations.
JavaScript
9
star
87

motephat-alexa

Control Pimoroni's (Mote) homelighting kit for the Raspberry Pi through the Alexa Skills kit
Python
9
star
88

eyes-in-the-sky

Instructions and Dockerfiles for tracking flights with your Raspberry Pi and a USB TV stick.
9
star
89

php7-swoole-template

OpenFaaS PHP7 template using Swoole
PHP
9
star
90

bulk-twitter-follow

Follow a bulk list of people on Twitter using the API
Python
9
star
91

restic-minio-civo-learn-guide

Backup your data using Restic, Minio, and Civo
9
star
92

locust-openfaas

Locust load-testing tool on OpenFaaS
Python
8
star
93

kubecon-blog

My blog about my KubeCon talk, also my demo
Go
8
star
94

captains-list

Gives a list of Docker Captain Twitter handles
HTML
8
star
95

mailbox

mailbox: a dead-letter queue for NATS Streaming
Go
8
star
96

arkade-get

Get all the CLIs you need from arkade for a GitHub Action
JavaScript
8
star
97

updateip

Update your Namecheap external IP with Dynamic DNS
Go
8
star
98

scroll-phat-node

Work-in-progress node.js library for Pimorani's scrollPhat
JavaScript
8
star
99

pimeter

Smart energy usage meter for Raspberry PI
JavaScript
7
star
100

static-site-template

Static site template with OpenFaaS and Nginx
Dockerfile
7
star