#833·slim

mint sensor writing to unauthorized directory in bitbucket pipeline

Author: Sharar294Created Feb 4, 2026Updated Feb 28, 2026
Labelstriage

Overview

Hi, I'm trying to integrate docker slim to reduce the size of docker images. I have a pipe.sh script in a repo that creates and pushes docker images to dockerhub. In this pipe.sh I'm building the regular docker image first and then slimming it right after.

Problem

Since the only writeable path is any subdirectory of BITBUCKET_CLONE_DIR, I made a subdirectory called "slim-state" which is where docker-slim writes some metadata. Even after doing this I'm getting this error:

level=fatal msg="slim: failure" error="API error (403): authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories"

This is how I'm using slim:

echo "Running docker-slim on image..." SLIM_IMAGE_TAG=${IMAGE_TAG}-slim SLIM_STATE_DIR="$BITBUCKET_CLONE_DIR/slim-state" mkdir -p ${SLIM_STATE_DIR} slim
--verbose
--debug
--state-path ${SLIM_STATE_DIR}
build
--tag $NAME:${SLIM_IMAGE_TAG}
--target $NAME:${IMAGE_TAG}
--http-probe=true \