For example, to rebuild a package without using the cache:
$ REPOS=docker-registry BUILD_OPTS=--no-cache ./build.sh
which lets you update your image after the upstream repository has
changed.
DOCKER_IO=$(command -v docker.io)
DOCKER="${DOCKER:-${DOCKER_IO:-docker}}"
+BUILD_OPTS="${BUILD_OPTS:-}"
REPOS="${REPOS:-
portage
< "${REPO}/Dockerfile.template" > "${REPO}/Dockerfile"
msg "build ${NAMESPACE}/${REPO}:${DATE}"
- "${DOCKER}" build -t "${NAMESPACE}/${REPO}:${DATE}" "${REPO}" || die "failed to build"
+ "${DOCKER}" build ${BUILD_OPTS} -t "${NAMESPACE}/${REPO}:${DATE}" "${REPO}" || die "failed to build"
fi
msg "tag ${NAMESPACE}/${REPO}:latest"
"${DOCKER}" tag -f "${NAMESPACE}/${REPO}:${DATE}" "${NAMESPACE}/${REPO}:latest" || die "failed to tag"