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
'WORKDIR /' in Dockerfile produces unusable image #6619
Comments
ping @tiborvass can you take a look at this one? |
The error probably hides in the build command. Yesterday, I was able to pull an image (built with 0.9) and run it on docker 1.0.1. After rebuilding the image with docker 1.0.1, I can no longer run it. |
|
I think the problem is with the replacement around 7a0e599#diff-6ce9e79ddb91a3f06352abe1f2c72ecbL142 , or one of the similar parts that replaces 'filepath.Join' with 'symlink.FollowSymlinkInScope' . symlink.FollowSymlinkInScope tries to determine if an absolute file path is within some base path, see https://github.com/dotcloud/docker/blob/master/pkg/symlink/fs.go#L28 The problem is that it uses In the OP's example the function would have been called like this: Because of the filepath.Dir(), the eventual comparison would become: ...which of course would evaluate to false. The drop-in replacement of |
Ping @vieux @tiborvass, any comments on this? |
@marcelchastain I have a PR coming. It's a bug in FollowSymlinkInScope. |
Because of this: moby/moby#6619 if you use `WORKDIR /`, you end up with an unusable image.
Use this Dockerfile:
And try to run a container from it:
The text was updated successfully, but these errors were encountered: