Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a possibility to use docker-slim?

Murilo Alves June 1, 2023

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

1 comment

Murilo Alves June 1, 2023

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

Murilo Alves June 1, 2023

The error I cited is at this point: slim build --target my-image:pre-image --tag my_account_aws.amazonaws.com/my-image:homolog

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events