To test my repo, I need to run:
```
Hi Pasquale and welcome to the community!
Docker compose is available in the image atlassian/default-image:4 as docker-compose. Please keep in mind that Docker compose v2 (which is preinstalled in atlassian/default-image:4) won't work with buildkit. Docker compose with buildkit builder by default requires privileged mode, which is disabled in Bitbucket Pipelines for security reasons. If you want to use Docker compose v2, you will need to disable buildkit by adding the command export DOCKER_BUILDKIT=0 in your yml file, in the Pipelines step that uses docker-compose. Restricted Docker commands and options are listed in this page:
Installing Docker Engine during your build won't work. Every pipelines step runs in a Docker container, and unless you use the docker service that Pipelines provide your build won't have access to a Docker daemon.
You can build your own Docker image that includes both python:3.11 and docker-compose, and use that as a build container in your Pipelines builds. You can install Docker Compose standalone (in images that don't include it) by following the instructions on this page:
You can use as base image python:3.11, or you could use a different one, e.g. alpine, ubuntu, debian and then install Python 3.11, docker-compose and any other tools you need by adding the necessary commands in the Dockerfile. You can then build and push this image to a Docker registry and reference it in your yml file. We support public and private Docker images including those hosted on Docker Hub, AWS, GCP, Azure and self-hosted registries accessible on the internet:
Finally, if you want to run docker commands that are restricted in Pipelines, you can use a self-hosted runner instead for a specific Pipelines step:
If you use a Linux Docker runner, you will need to define a custom dind image for the Docker service, so that you won't run into the same restrictions as cloud-based builds:
Please feel free to let me know if you have any questions.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome. Please feel free to reach out if you have any questions!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Pasquale Lafiosca
From my experience, using Docker Compose and Python 3.11 in Bitbucket Pipelines requires careful image selection and setup. The recommended atlassian/default-image:4 works, but it’s inefficient to manually install Python.
Consider creating a custom Docker image that includes both Python 3.11 and Docker Compose pre-installed to streamline your pipeline.
For the error with tee, ensure that all required dependencies are installed in your pipeline’s environment. If the issue persists, consult Docker documentation or contact Atlassian support at https://support.atlassian.com/contact/#/ for guidance on optimizing your setup.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.