Backward compatibility issue with valid Dockerfile starting container process caused "chdir to cwd (\"/app\") set in config.json failed: not a directory
Closed this issue · 5 comments
Hi everyone!
While copying an existing docker file, I ran into an error... container_linux.go:247: starting container process caused "chdir to cwd (\"/app\") set in config.json failed: not a directory"container_linux.go:247: starting container process caused "chdir to cwd (\"/app\") set in config.json failed: not a directory"
The same file content in the original Dockerfile works with a docker build -t sometag .
call.
Steps to reproduce
- Install docker and rocker
git clone https://github.com/dotnet/dotnet-docker-samples/
cd dotnetapp-dev
cp Dockerfile Rockerfile
rocker build
$ rocker build
INFO[0000] FROM microsoft/dotnet:1.1-sdk-msbuild
INFO[0000] | Image sha256:93863 size=881.8 MB
INFO[0000] WORKDIR /app
INFO[0000] Commit changes
INFO[0000] | Cached! Take image sha256:556af size=881.8 MB (+0 B)
INFO[0000] COPY dotnetapp.csproj .
INFO[0000] | Calculating tarsum for 1 files (190 B total)
INFO[0000] | Cached! Take image sha256:a28c4 size=881.8 MB (+190 B)
INFO[0000] RUN dotnet restore
INFO[0000] | Not cached
INFO[0000] | Created container 99170ee4b7cf (image sha256:a28c4)
container_linux.go:247: starting container process caused "chdir to cwd (\"/app\") set in config.json failed: not a directory"
INFO[0000] | Removing container 99170ee4b7cf
FATA[0000] API error (500): {"message":"oci runtime error: container_linux.go:247: starting container process caused \"chdir to cwd (\\\"/app\\\") set in config.json failed: not a directory\"\n: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type"}
Versions
rocker --version
rocker version 1.3.0 - 9444404 (master) 2016-07-20_13:43_GMT
docker --version
Docker version 1.13.0, build 49bf474
Background
I don't have any background in dotnet, but was trying to help someone set up a docker based pipeline using rocker. This is my first time using rocker, and I ran into an issue. I was trying to use a 'dev' container, build an artifact, export it, import it to a 'prod' container, and not require the full sdk.
Before I could even try to use the import/export functionality to bring the build artifact across to the deployment container, I ran into an issue that causes me to believe there are some backwards compatibility issues between the Dockerfile as a Rockerfile (with my current rocker and docker versions).
Thanks in advance for our help or advice!
Hi, @Cinderhaze!
I was able to reproduce it, and it looks like this is a compatibility issue. The problem arises on line 5 of that Dockerfile. Looks like Rocker is replacing /app
folder with dotnetapp.csproj
file. However, it starts working after changing that line to COPY dotnetapp.csproj ./
Thanks for reporting!
No problem @rodio, It helps the community to improve its products!
Still a problem.
Thanks for reporting. Unfortunately, we are discontinuing this project. See the notice here: https://github.com/grammarly/rocker/blob/master/README.md
Closing this issue as we are not able to address it. Sorry.