New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround for --privileged on Bitbucket pipelines? #789
Comments
@Divaaan try with |
@gperdomor Champ! Thanks for the quick reply, will have a try and let you know 👌🏼 |
@gperdomor So I tried the above command but same issue. I've tried using podman now as well with your container but getting the following: Here is my step in my pipeline .yml file
|
@Divaaan Yes, podman should be installed in the environment... I provide 3 images (for docker, podman and kaniko) to run the build inside Gitlab CI, you can check the example of usage here https://github.com/gperdomor/nx-tools/blob/main/packages/nx-container/docs/ci/gitlab-ci.md I did't test it in bitbucket but in theory should works too |
@gperdomor Thanks for the info. Still a bit unsure on what you mean by podman needing to be installed in the environment? |
The provided image already has Podman installed, so you can skip that step... but the default image used by bitbucket pipelines not, that is why you are getting the Podman error |
I'm not a bitbucket user but I will try to create a repo tomorrow to try to help you 😅 |
@gperdomor Ah okay that makes sense! Can you maybe explain as well what makes your |
@Divaaan all the images contains node, yarn, npm, pnpm, git, other common tools and docker, podman or kaniko |
Maybe someone will benefit, as I was able to run nx-container with Kaniko on Bitbucket Pipelines - step:
name: Build docker images
image: gperdomor/nx-kaniko:20.11.0-alpine
script:
- export INPUT_ENGINE=kaniko
- export INPUT_PUSH=true
- NX_HEAD=$BITBUCKET_COMMIT
# Login to registry
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"$(echo -n $DH_USER:$DH_PASS | base64)\"}}}" > /kaniko/.docker/config.json
- npx nx affected --target=build-docker --base="origin/main" --head=HEAD --configuration=production --parallel=1 |
I found that the Docker build command contains buildx |
Hi @gperdomor, I tried with podman but I face with unknown error.
I think Docker is better but in your code, buildx is a required argument. Therefore, noway to bypass on the Bitbucket. |
Hi, any idea how to get around the following?
NX buildx failed with: ERROR: Error response from daemon: authorization denied by plugin pipelines: --privileged=true is not allowed
I've tried search, some suggested you set the
DOCKER_BUILDKIT=0
but no luck as Bitbucket doesn't allow the use of--privileged
Any suggestions would be greatly appreciated.
The text was updated successfully, but these errors were encountered: