Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Backward compatibility issue with valid Dockerfile starting container process caused "chdir to cwd (\"/app\") set in config.json failed: not a directory #171

Closed
Cinderhaze opened this issue Feb 26, 2017 · 5 comments

Comments

@Cinderhaze
Copy link

Cinderhaze commented Feb 26, 2017

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

  1. Install docker and rocker
  2. git clone https://github.com/dotnet/dotnet-docker-samples/
  3. cd dotnetapp-dev
  4. cp Dockerfile Rockerfile
  5. 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!

@rodio
Copy link

rodio commented Feb 28, 2017

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!

@Cinderhaze
Copy link
Author

No problem @rodio, It helps the community to improve its products!

@Perlence
Copy link

Perlence commented Apr 5, 2017

Looks to me as duplicate of #119.

@edhemphill
Copy link

Still a problem.

@ybogdanov
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants