Jenkins Dockerfile – unable to prepare context: unable to evaluate symlinks in Dockerfile

I’m having the following issue trying to build a project in Jenkins with the “Build inside a Docker container” functionality.

Started by user UserName LastName
Building in workspace /opt/bitnami/apps/jenkins/jenkins_home/jobs/app/workspace
/opt/bitnami/git/bin/git rev-parse –is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
/opt/bitnami/git/bin/git config remote.origin.url https://github.com/pierreburgy/sails-app # timeout=10
Fetching upstream changes from https://github.com/pierreburgy/sails-app
/opt/bitnami/git/bin/git –version # timeout=10
/opt/bitnami/git/bin/git -c core.askpass=true fetch –tags –progress https://github.com/pierreburgy/sails-app +refs/heads/:refs/remotes/origin/
/opt/bitnami/git/bin/git rev-parse refs/remotes/origin/master^{commit} # timeout=10
/opt/bitnami/git/bin/git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision a6e83d91be393fd8d597829ce5f84b336af1572b (refs/remotes/origin/master)
/opt/bitnami/git/bin/git config core.sparsecheckout # timeout=10
/opt/bitnami/git/bin/git checkout -f a6e83d91be393fd8d597829ce5f84b336af1572b
/opt/bitnami/git/bin/git rev-list a6e83d91be393fd8d597829ce5f84b336af1572b # timeout=10
Build Docker image from ./Dockerfile …
$ /opt/bitnami/apps/jenkins/jenkins_home/tools/org.jenkinsci.plugins.docker.commons.tools.DockerTool/docker/bin/docker build –tag 17e2f7f926ff8a6c7e412defb7c2cb8140761e26 –file Dockerfile /opt/bitnami/apps/jenkins/jenkins_home/jobs/app/workspace
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /opt/bitnami/apache-tomcat/logs/Dockerfile: no such file or directory
FATAL: Failed to build docker image from project Dockerfile
java.lang.RuntimeException: Failed to build docker image from project Dockerfile
at com.cloudbees.jenkins.plugins.docker_build_env.Docker.buildImage(Docker.java:127)
at com.cloudbees.jenkins.plugins.docker_build_env.DockerfileImageSelector.prepareDockerImage(DockerfileImageSelector.java:41)
at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:167)
at hudson.model.Build$BuildExecution.doRun(Build.java:156)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Finished: FAILURE
“`

  • Managing Docker containers from Ansible plays
  • What is the interaction of Docker's CpuShares between containers?
  • Moving app to docker from host increases HTTP lag by 5 seconds
  • kubernetes pod can't connect (through service) to self, only to other pod-containers
  • How to logging in Amazon Web Service ( AWS )?
  • gcloud Connection Issue During Docker Build
  • Here is the code of the project : https://github.com/pierreburgy/sails-app

    Do you have any idea about what could be the issue ?

    Thanks in advance

  • Node webservice in Docker with entrypoint fails but works otherwise
  • In docker container connect from inside to local apache not happening
  • Selecting different code branches when using a shared base image in Docker
  • exec: “dnu”: executable file not found in $PATH
  • Apache2 Container on BlueMix won't stay up
  • Plex using Ansible and Docker
  • One Solution collect form web for “Jenkins Dockerfile – unable to prepare context: unable to evaluate symlinks in Dockerfile”

    The GitHub project you’re referencing does not have a Dockerfile that actually installs sails. Here’s the actual content of the Dockerfile in the project you mentioned.

       FROM node
       RUN echo 'we are running some # of cool things'
    

    Here’s another project that you can check out: https://github.com/artificialio/docker-sails

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.