#Dagger Ci with bitbucket pipeline

1 messages · Page 1 of 1 (latest)

undone salmon
#

Wondering if anyone has implemented Dagger with bitbucket pipeline, or if i can get assistance with correcting what i have so far. i am using the simple test example for the python sdk. what i found is that we cannot enable privilege container in bitbucket pipeline. does it mean we can't use docker with it

image: python:3.11-alpine
pipelines:
    default:
        - step:
              services:
                  - docker
              script:
                  - python -m pip install --upgrade pip
                - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
                - pip install dagger-io
                - python pipeline.py

pipeline error

+ python pipeline.py lint
Error: failed to run container: docker: Error response from daemon: authorization denied by plugin pipelines: --privileged=true is not allowed.
                                                                    See 'docker run --help'.
: exit status 125
ruby abyss
undone salmon
ruby abyss
#

Are you also getting the privileged error on the self hosted runner?

undone salmon
#

yes

undone salmon
# undone salmon yeah, that was what i thought, i set up custom self hosted runner but could not ...

in fact i just deleted the runner and recreate it with --privileged flag before creating it again. below is the command i used in creating the container

docker container run -it \
    -v /tmp:/tmp -v /var/run/docker.sock:/var/run/docker.sock \
    -v /var/lib/docker/containers:/var/lib/docker/containers:ro \
    -e ACCOUNT_UUID={3e49ee5e8a64} \
    -e REPOSITORY_UUID={feb8d7661fa1} \
    -e RUNNER_UUID={a2ffbdba0b7} \
    -e RUNTIME_PREREQUISITES_ENABLED=true \
    -e OAUTH_CLIENT_ID=u6WuBS4 \
    -e OAUTH_CLIENT_SECRET=AT38F45 \
    -e WORKING_DIRECTORY=/tmp \
    --name runner-842ffbdba0b7 \
    --privileged \
    -d \
    docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner:1

but i still get this

Error: failed to run container: docker: Error response from daemon: authorization denied by plugin pipelines: --privileged=true is not allowed.

ruby abyss
#
undone salmon