diff --git a/Makefile b/Makefile index ce6ec04e0..80036bc85 100644 --- a/Makefile +++ b/Makefile @@ -87,19 +87,25 @@ image: prod_image docker tag '${NAME}:${VERSION}' '${NAME}:${VERSION}-p${PYTHON_VERSION}' deps_image: - docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --build-arg 'ALPINE_VERSION=${ALPINE_VERSION}' --tag '${NAME}:${VERSION}-deps' -f Dockerfile --target deps . + BUILDKIT=1 docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --build-arg 'ALPINE_VERSION=${ALPINE_VERSION}' --tag '${NAME}:${VERSION}-deps' -f Dockerfile --target deps . + +ansible_image: + BUILDKIT=1 docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --build-arg 'ALPINE_VERSION=${ALPINE_VERSION}' --tag '${NAME}:${VERSION}-deps' -f Dockerfile --target ansible . dev_image: - docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --build-arg 'ALPINE_VERSION=${ALPINE_VERSION}' --tag '${NAME}:${VERSION}-dev' -f Dockerfile --target dev . + BUILDKIT=1 docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --build-arg 'ALPINE_VERSION=${ALPINE_VERSION}' --tag '${NAME}:${VERSION}-dev' -f Dockerfile --target dev . docs_image: - docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --build-arg 'ALPINE_VERSION=${ALPINE_VERSION}' --tag '${NAME}:${VERSION}-docs' -f Dockerfile --target docs . + BUILDKIT=1 docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --build-arg 'ALPINE_VERSION=${ALPINE_VERSION}' --tag '${NAME}:${VERSION}-docs' -f Dockerfile --target docs . build_image: - docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --build-arg 'ALPINE_VERSION=${ALPINE_VERSION}' --tag '${NAME}:${VERSION}-build' -f Dockerfile --target build . + BUILDKIT=1 docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --build-arg 'ALPINE_VERSION=${ALPINE_VERSION}' --tag '${NAME}:${VERSION}-build' -f Dockerfile --target build . + +build_image_prod: + BUILDKIT=1 docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --build-arg 'ALPINE_VERSION=${ALPINE_VERSION}' --tag '${NAME}:${VERSION}-build' -f Dockerfile --target prod_build . prod_image: - docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --tag '${NAME}:${VERSION}' -f Dockerfile --target prod . + BUILDKIT=1 docker build --progress plain --no-cache --pull --build-arg 'PYTHON_VERSION=${PYTHON_VERSION}' --build-arg 'ALPINE_IMAGE=${ALPINE_IMAGE}' --build-arg 'ALPINE_VERSION=${ALPINE_VERSION}' --tag '${NAME}:${VERSION}' -f Dockerfile --target prod . dev: ./canuctl -d diff --git a/canuctl b/canuctl index a23883208..fa27b81c4 100755 --- a/canuctl +++ b/canuctl @@ -176,7 +176,7 @@ main() { # if that fails, try to build it and tag the image if [[ "${REBUILD:-}" == "true" ]]; then - if "${PLATFORM}" build \ + if BUILDKIT=1 "${PLATFORM}" build \ --build-arg ALPINE_IMAGE="${ALPINE_IMAGE}" \ --build-arg PYTHON_VERSION="${PYTHON_VERSION}" \ --build-arg ALPINE_VERSION="${ALPINE_VERSION}" \