-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker: Error response from daemon: the working directory ... is invalid, it needs to be an absolute path. #2204
Comments
Hello @NikolayPianikov I also faced the same issue and resolved it Just need few inputs from ur end. I would like to ask one question please don't mind: Which command line interface are you using: CMD, Gitbash (Particulary linux based) ? Thank you |
The error itself comes from the daemon; https://github.com/docker/engine/blob/v19.03.5/daemon/container.go#L383-L405 And depending on if the daemon is running on Linux or Windows, this is the check that determines if the path is absolute; https://github.com/docker/engine/blob/v19.03.5/pkg/system/filesys.go#L23 https://github.com/docker/engine/blob/v19.03.5/pkg/system/filesys_windows.go#L132 I see that "experimental" mode is enabled on the daemon and the |
@thaJeztah : So whats the solution here mate? I am also having the same Issue but your answer doesnt seems to help. I have docker toolbox on my windows10 machine Installed and I am trying to build aan image from Dockerfile: Docker file Install MavenRUN apt-get update && \apt-get install -y maven && \apt-get clean Install ChromeRUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb install chromedriverRUN apt-get install -yqq unzip ANd I see the following error below: Started by user Nouman Arshad Syed
Step 1/8 : FROM openjdk:8
|
What should I do to resolve Absolute path Issue? |
Any update on this? I'm having the same issue as @noumaan786arshad, building a docker image in jenkins and then executing "sh npm script" |
I just installed the Windows 10 2004 update, so that I could install Docker Desktop. I am following the onboarding tutorial, but now I am running into the same issue. Apparently, this is because I am using Git Bash. I already has an issue before, when logging in to Docker Hub, and then could solve it by using winpty, but that did not help in this case. I finally got it working by using PowerShell to execute the docker command instead. For some reason, then it does not complain about the working directory... Not the solution I was looking for, because I'd like to keep using Git Bash. |
If you have Git Bash installed, you're hitting Mingw/msys2's POSIX path conversion feature; see docker/docs#10912 and docker/for-win#6754 (comment)
|
Run it with PowerShell. Solved for me. |
To get this working in GitBash I used: docker run -p 8082:3000 -v /e:/development/docker/ExpressSite://var/www -w "//var/www" node npm start I have a nodeJs site in the E: development docker ExpressSite folder which I wanted to mount as a volume in the container as /var/www and setting the working directory "-w" to /var/www. Using the above command line got this working. |
I ran into the problem when attempting to run a docker command in git bash with |
@senjenathaniel see my comment above for the git bash case; #2204 (comment) |
@piccolorio , Mind explaining how you went about doing it that way? |
I solved it by removing the
|
I am having that problem with jenkins now. Even using /c/agent-86 or //c/agent-86 for the agent's working directory gets:
and
The source looks like it might be looking for a ':' if the os is unix and may be getting confused? thanks |
Win 7 x64, Docker Toolbox 19.03.1: for me solution was to add extra
|
encounter the sa problem using gitbash under win10, this works for me! |
Am new to all this tools and programming, please help me in this while running my sample nodejs and react app in jenkins i get this error.
|
@Aravindyadhav your comment doesn't show the command you used to create / run the container, only a |
I'm hitting the same issue with a slightly different command:
Using GitBash terminal integrated into Visual Studio Code the error is
I tried the PowerShell solution, but it fails due to
Also tried googling for a solution but there was a thing called compact disk in prehistoric times that swarms the search results. EDIT: Nevermind, it worked with CMD. |
curl : Cannot find drive. A drive with the name 'https' does not exist.
not working what should i do |
thank you so much for consdering my question and i resolved the error somehow, thanks alot for your reply. |
@Aravindmuniraj do you have any idea what the problem was? I got the same error and stuck for a while :( Thanks for the help in advance |
please paste your reply here i will try to help if possible. |
I somehow managed to do it, but I dont remember how. Thanks for the answer anyways. ( I remember that this thread did help) |
Hello I encountered the same problem with jenkins, did you find the suitable solution? Jenkins does not seem to be running inside a container |
This is the end of 2022 and I experienced the same error. If anyone has the same error using bash command line on windows, you may like to use powershell with admin rights. |
It worked for me when I used Windows Command Prompt. |
It worked for me by applying a double slash at the beginning of the working directory route and at the beginning of the host route. I leave an example
|
@Angell4S looks like you ran into mingw automatic path conversion, which was mentioned further up in this ticket #2204 (comment) |
Looking at this ticket, I don't think there's anything actionable / anything to fix here, and many comments are related to the automatic path conversion mentioned, which is not an issue with docker itself. I'm closing this ticket |
Description
docker CLI reports error docker: Error response from daemon: the working directory '...' is invalid, it needs to be an absolute path.
Steps to reproduce the issue:
Use docker CLI on Windows for Windows containers
Run
docker CLI reports
docker: Error response from daemon: the working directory 'c:\buildagenttemp\work\9d55fd57e39bb0f1' is invalid, it needs to be an absolute path. See 'docker run --help'.
Describe the results you received:
docker: Error response from daemon: the working directory 'c:\buildagenttemp\work\9d55fd57e39bb0f1' is invalid, it needs to be an absolute path. See 'docker run --help'.
Process exited with code 125
Describe the results you expected:
Everything should be ok there
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Host:
Related issue: https://youtrack.jetbrains.com/issue/TW-62945
The text was updated successfully, but these errors were encountered: