Dockerfiles for various common implementations
This repository provides Dockerfiles for use with CentOS. Popular implementations here will be published to the CentOS namespace in the docker index.
Each Dockerfile should contain a README that includes the following:
An example of building all images found within this git repository can be done with the following two bash for loops from the base dir of your git clone:
--
# Building everything from centos:centos6 base image
for dir in ./*/centos6
do
pushd $dir &> /dev/null
# tmp var for short dirname
tmp=$(dirname $dir)
# strip all characters leading up to and including '/'
appname=${tmp##*/}
disttag=${dir##*/}
docker build -t $USER/${appname}:${disttag} .
popd &> /dev/null;
done
# Building everything from centos:centos7 base image
for dir in ./*/centos7
do
pushd $dir &> /dev/null
# tmp var for short dirname
tmp=$(dirname $dir)
# strip all characters leading up to and including '/'
appname=${tmp##*/}
disttag=${dir##*/}
docker build -t $USER/${appname}:${disttag} .
popd &> /dev/null
done
--
You'll notice that the appname/disttag structure is laid out on purpose, so if you would prefer to only build a single image this can be done by either following the specific README.md contained with the Dockerfile or with the below guideline:
# $appname and $disttag should be something along the lines of 'httpd' and
# 'centos7' respectively
cd $appname/$disttag
docker build -t $USER/${appname}:${disttag} .
--
Known issues: