unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /opt/atlassian/pipe

kdao_dev
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 13, 2017

I would like to use bitbucket pipelines. I configure pipelines file but i have this error: 

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /opt/atlassian/pipelines/agent/build/Dockerfile: no such file or directory

 

here is my config file:

image: maven:3.3.9

options:
  docker: true
  
pipelines:
  branches:
    develop:
      - step:
          caches:
            - maven
          script:
            - export IMAGE_NAME=$DOCKER_HUB_USERNAME/$DOCKER_HUB_APP_NAME:$BITBUCKET_COMMIT      
            - docker build -t $IMAGE_NAME .
            - docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
            - docker push $IMAGE_NAME
          services:
            - database

definitions:
  services:
    database:
      image: mysql
      environment:
        MYSQL_ROOT_PASSWORD: password

 

Any help please!

8 answers

3 votes
Shojibur Rahman (Shoji)
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!
January 21, 2019

Hey guys, i was having similar issue - 

What i realize is that, my dockerfile name was DockerFile [in the repo] but bitbucket pipeline is looking for Dockerfile. 

If this is the case just rename DockerFile to Dockerfile 

Thanks me later 

0 votes
mohit Mishra December 6, 2022

anyone got any ans for ths issue ?

0 votes
Alan Cooper
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!
April 1, 2021

This is often actually a file not found error - check you've actually committed & pushed your Dockerfile to the bitbucket repo properly and it's correctly named and referenced.

0 votes
jmoratat
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!
November 9, 2018

I have the same issue... and I have the DockerFile in root dir (working space in Pipeline).

¿Any idea?

0 votes
krzysztofmejka
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!
August 3, 2018

One suggestion - try adding `ls -lR` to one of your build steps. Perhaps you are actually missing the file in the folder where the build is run?

This helped me with my problems.

0 votes
Deleted user August 3, 2018

I've got the same issue, we only copied the pipeline example from bitbucket and doesn't work.

0 votes
krzysztofmejka
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!
March 23, 2018

I've got the same problem. @SeanHashi @kdao_dev did you find any solution?

0 votes
SeanHashi
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!
January 25, 2018

I am having the same issue. 

All I did was use the default docker pipeline script (and swapped out the placeholders) and I am getting the same error. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events