Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

pipeline fails with apt-get: command not found

Gunter Sammet
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 10, 2025

Hi all:

I tried to run one of my pipelines today and get the message

 

+ apt-get update
bash: apt-get: command not found
it uses the following image:

image: bitnami/git

The pipeline is run via https://bitbucket.org/myaccountname/myrepo/pipelines

When I ran it end of September all was still working. Any suggestions?

Thanks,

Gunter

1 answer

1 accepted

0 votes
Answer accepted
Pallavi Shirodkar
Contributor
October 12, 2025

Hi @Gunter Sammet 

The Bitnami Git container does not contain apt-get or any package manager, which is purposefully done for security, performance, and size reasons. This is typical for Bitnami "distroless" or minimal images, as indicated by the "apt-get: command not found" error in your Bitbucket pipeline using the image bitnami/git. ​

The Reason This Worked Earlier
Bitnami updates container base images on a regular basis. While earlier versions may have used a different base image or incorporated apt, most recent versions do not.


If you rely on apt-get instructions, the error just appears now since the package management was probably removed in the most recent bitnami/git image upgrade.

Try this once:

Change the Image: Use an Ubuntu or Debian-based image with a package management installed (for instance, ubuntu:latest, debian:latest, or even node:16 if you also need node). This enables the apt-get update to function as planned.

Create your own Dockerfile by starting with a base (such as Debian/Ubuntu), installing git, and adding any other components you require. Then, use the image in your pipeline.


Pre-build Dependencies: Use Bitbucket's built-in support or another "fatter" container where necessary packages are already installed if you only need git for cloning or checkout.

I hope this helps!

Gunter Sammet
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 12, 2025

Hi @Pallavi Shirodkar 

Thanks for pointing this out and the explanation. That helped me understand pipelines a bit more. Since I am only using git ftp, I changed the image to "wagnerstephan/bitbucket-git-ftp:latest". This allowed me to remove "apt-get" completely.

Gunter

Like Pallavi Shirodkar likes this
Pallavi Shirodkar
Contributor
October 12, 2025

Hi @Gunter Sammet 

Thank you so much! Happy to help you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events