I'm trying to use docker-slim. But every time I run my pipeline it returns the error below. I came to think that I would have to use the 'sudo' command, but from research in the community I found that users are already root by default, is that right? can you help me?
level=error msg="dockerutil.CopyToVolume: dclient.CreateContainer() error = API error (403): authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories
level=fatal msg="slim: failure" error="API error (403): authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories
The error I cited is at this point: slim build --target my-image:pre-image --tag my_account_aws.amazonaws.com/my-image:homolog
By the way, I'm trying to use docker-slim in bitbucket pipeline.
I'm using a script like this:
- step:
name: Step Name - publish to ECR
image: my/deploy_image_alpine:latest
trigger: automatic
services:
- docker
caches:
- pip
script:
- apk update
- apk add bash
- apk add curl
- curl -L -o ds.tar.gz https://downloads.dockerslim.com/releases/1.40.2/dist_linux.tar.gz
- tar -xvf ds.tar.gz
- mv dist_linux/docker-slim /usr/local/bin/
- mv dist_linux/slim-sensor /usr/local/bin/
- mv dist_linux/slim /usr/local/bin/
- docker login --username AWS --password $pwd my_account_aws
- docker build -t my-image:pre-image .
- slim build --target my-image:pre-image --tag my_account_aws.amazonaws.com/my-image:homolog
- docker push my_account_aws.amazonaws.com/my-image:homolog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.