Hedgedoc : nettoyer les image du build
This commit is contained in:
parent
681d344e54
commit
6ae3e30114
|
@ -12,15 +12,13 @@ buildfolder=/tmp/hedgedoc-$$
|
||||||
if ! podman image exists ${hedgedoc_image}:${hedgedoc_version}; then
|
if ! podman image exists ${hedgedoc_image}:${hedgedoc_version}; then
|
||||||
mkdir ${buildfolder} &&
|
mkdir ${buildfolder} &&
|
||||||
git clone --depth=1 https://github.com/hedgedoc/container ${buildfolder}/ && {
|
git clone --depth=1 https://github.com/hedgedoc/container ${buildfolder}/ && {
|
||||||
#sed_in_place "^FROM golang" "FROM docker.io/library/golang" ${buildfolder}/Dockerfile
|
sed_in_place "^FROM node" "FROM docker.io/library/node" ${buildfolder}/alpine/Dockerfile
|
||||||
#sed_in_place "^FROM alpine" "FROM docker.io/library/alpine" ${buildfolder}/Dockerfile
|
|
||||||
TMPDIR=${HOME} podman image build -t ${hedgedoc_image}:${hedgedoc_version} --build-arg VERSION=${hedgedoc_version/%-alpine/} -f ${buildfolder}/alpine/Dockerfile ${buildfolder}
|
TMPDIR=${HOME} podman image build -t ${hedgedoc_image}:${hedgedoc_version} --build-arg VERSION=${hedgedoc_version/%-alpine/} -f ${buildfolder}/alpine/Dockerfile ${buildfolder}
|
||||||
}
|
}
|
||||||
rm -rf ${buildfolder}
|
rm -rf ${buildfolder}
|
||||||
podman image prune -a -f --filter dangling=true
|
podman image prune -a -f --filter dangling=true
|
||||||
podman image prune -a -f --filter intermediate=true
|
podman image prune -a -f --filter intermediate=true
|
||||||
#podman image rm -f $(podman images -a -q -- docker.io/library/golang)
|
podman image rm -f $(podman images -a -q -- docker.io/library/node)
|
||||||
#podman image rm -f $(podman images -a -q -- docker.io/library/alpine)
|
|
||||||
else
|
else
|
||||||
echo "Image ${hedgedoc_image}:${hedgedoc_version} already built"
|
echo "Image ${hedgedoc_image}:${hedgedoc_version} already built"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue