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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

apt-get install fails in BitBucket Pipeline, but works fine locally in local docker Edited

Hi there,

I'm building a Docker image in BitBucket Pipeline using:

Dockerfile: (committed at the root of my repository; code simplified)

FROM php:7.2-fpm

# Install dependencies
RUN apt-get update && apt-get install -y mysql-client

and bitbucket-pipelines.yml:

image: atlassian/pipelines-awscli

pipelines:
  branches:
    develop:
      - step:
        script:
          - docker build .

 

This used to work fine for months, until last week where my build in BitBucket Pipeline started to fail with "E: Package 'mysql-client' has no installation candidate".

However if I build this Docker image on my local machine, apt-get finds/installs the package successfully.

Tried with the latest php:7.3-fpm to no avail. Tried with ubuntu:xenial to no avail. They all build locally but not in BitBucket Pipeline. Tried using the default BitBucket Pipeline Docker image rather than atlassian/pipelines-awscli, same failure.

Any idea how to fix this?

1 answer

I have the same problem and no idea how to resolve.

EDIT:

Try this package

default-mysql-client

instead

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,059 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you