Docker image for running a Pelican blog
783
A machine for maintaining a Pelican web site with a few extras to handle build tasking using Git, Fabric and GPG.
Copy the run.sh.tpl file to something else, say, run.sh. Add any items you might want in the .gnupg and .ssh directories. Edit your .gitconfig file as necessary
#!/bin/bash
###
# Add more mounts for your projects after the git/gnupg/ssh ones
# e.g. -v ~/stuff/myproject:/project \
wd=$(pwd)
img=docker-pelican
if docker ps | grep $img | awk '{ print $11 }'
then
com=$(docker rm -f $img)
echo "Removed ${com}"
fi
docker run \
--name $img \
-p 80:8000 \
-v $wd/git/.gitconfig:/root/.gitconfig \
-v $wd/gnupg:/root/.gnupg \
-v $wd/ssh:/root/.ssh \
-v ~/mydir:/project \
-ti \
chrisramsay/$img:latest \
/bin/bash
To run the container:
$ ./run.sh
Edit the run.sh file to add as many extra mount commands as you need.
There is a build.sh file packaged here. This is to help with further development of the container. One of a number of possible options must be passed at run time.
Runs the standard docker build command with a few build arguments; tags as both verson and latest picking up build version from the VERSION file.
Does not execute docker build. Instead modifies the Dockerfile replacing in-place values from the Dockerfile.tmpl with label values. This should be done prior to a tagged release.
Used in order to reinstate the normal Dockerfile for continuing development. Utility function only.
build directorybuild/VERSION$ ./build.sh restore to set up a clean Dockerfilebuild/Dockerfile.tmpl$ ./build.sh build to build current tag and latest$ ./build.sh releaseContent type
Image
Digest
Size
252.8 MB
Last updated
over 8 years ago
docker pull chrisramsay/docker-pelican