Skip to content
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

Fix --workdir=/ #6646

Merged
merged 2 commits into from Jun 25, 2014
Merged

Fix --workdir=/ #6646

merged 2 commits into from Jun 25, 2014

Conversation

tiborvass
Copy link
Contributor

Fixes #6619.

This fixes a bug in FollowSymlinkInScope in the case where link == root.

@tiborvass tiborvass changed the title Fix --workdir=/ Fix --workdir=/ Jun 24, 2014
@tiborvass
Copy link
Contributor Author

ping @crosbymichael @vieux @unclejack

@vieux
Copy link
Contributor

vieux commented Jun 24, 2014

I can't think of any, but are we sure that changing FollowSymlinkInScope won't have any side effect ? @crosbymichael @unclejack

@crosbymichael
Copy link
Contributor

Should this check happen after we get the Abs of both the link and root?

@LK4D4
Copy link
Contributor

LK4D4 commented Jun 24, 2014

@tiborvass Also, your test doesn't test original problem described in #6619 :) I mean that it was about Dockerfile.

@tiborvass
Copy link
Contributor Author

@LK4D4 the original problem was about running an image with workdir=/. It just happened that the reporter built the image with a Dockerfile. The problem is not Dockerfile-specific though.

@tiborvass
Copy link
Contributor Author

@crosbymichael you are right. I updated the PR.

@crosbymichael
Copy link
Contributor

travis failed because of go fmt

return root, nil
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this double space is what gofmt doesn't like.

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
@tiborvass
Copy link
Contributor Author

@tianon @crosbymichael updated.
Weird that my gofmt didn't kick off.

@vieux
Copy link
Contributor

vieux commented Jun 25, 2014

LGTM @crosbymichael @LK4D4 @unclejack can you please review this ?

@crosbymichael
Copy link
Contributor

LGTM

crosbymichael pushed a commit that referenced this pull request Jun 25, 2014
@crosbymichael crosbymichael merged commit d91b8bc into moby:master Jun 25, 2014
bogwonch pushed a commit to bogwonch/skb that referenced this pull request Nov 13, 2014
moby/moby#6646

Looks like Ubuntu's Docker doesn't like the workdir being set to /.
@tiborvass tiborvass deleted the fix-workdir branch July 17, 2019 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'WORKDIR /' in Dockerfile produces unusable image
5 participants