Blog ready container images, using pelican blog engine, nginx and git for article versions control and deployment.
1.5K
https://github.com/bpetit/dockerfiles/blob/master/pelican/Dockerfile
docker pull bpetit/pelican
docker run -d -i --name='myblog' --hostname='myblog01' -t bpetit/pelican
Find the container small ID with:
docker ps
Then:
docker attach MYCONTAINERID
Give to pelican the informations it asks, only the title, the author's name and the url are relevant.
> What will be the title of this web site? My super blog
> Who will be the author of this web site? My Self
> What will be the default language of this web site? [en]
> Do you want to specify a URL prefix? e.g., http://example.com (Y/n) n
> Do you want to enable article pagination? (Y/n)
> How many articles per page do you want? [10]
> Do you want to generate a Fabfile/Makefile to automate generation and publishing? (Y/n)
> Do you want an auto-reload & simpleHTTP script to assist with theme and site development? (Y/n)
> Do you want to upload your website using FTP? (y/N)
> Do you want to upload your website using SSH? (y/N)
> Do you want to upload your website using Dropbox? (y/N)
> Do you want to upload your website using S3? (y/N)
> Do you want to upload your website using Rackspace Cloud Files? (y/N)
> Do you want to upload your website using GitHub Pages? (y/N)
Done. Your new project is available at /var/www/blog
When you see this message of success: hint Ctrl+p+q to detach the container.
Be careful: dont hint Ctrl+c, it would kill the container.
Be careful: if you specify a site url, it has to be the one that permits to reach the blog, otherwise there will be mistakes in links inside the html files and the blog theme will disappear.
docker inspect myblog | grep Address
"IPAddress": "172.17.0.162",
docker logs myblog | grep 'initial pass'
root initial password: UCGFr4S838jysIQ8GsdftETe9x
Change the root password ASAP
# su git
$ cd && vi .ssh/authorized_keys
Paste ssh pubkeys in this file, save and quit (:wq)
git clone [email protected]:blog.git myblog
Then you can start to write articles (see http://docs.getpelican.com/en/3.4.0/content.html), commit and push. A push will trigger a regeneration of html pages with the new content.
Content type
Image
Digest
sha256:e125f9bd7…
Size
236.1 MB
Last updated
almost 11 years ago
docker pull bpetit/pelican