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 build: ensure a Dockerfile exists in src directory #2319
Comments
I think @peterbraden 's patch for #2112 could be refactored to include testing for Dockerfile (shame that pushes that test from the daemon to the cli) - avoiding the unintentional DOS / mass IO. this still won't mitigate the risks fully, taring up the entire filesystem and tossing it over the pipe probably needs to be chunked if it were intentional |
Even if the CLI did check for an existing Dockerfile before uploading the build context that will not help if you place a Dockerfile in your root What do you think the appropriate fix should be? |
@crosbymichael Perhaps we should disallow the use of What do you think? |
You could still tar up any other directory by accident with that solution. A stupid question cos i'm not 100% clued up on everything. Why would I want to be able to specify a directory without a Docker file in it? |
@outrunthewolf Those two checks (verify that we're not using |
Its possible for Docker to tar up entire directories when there is no Dockerfile present and send to the daemon.
For example, running this command in /home
Will tar up the entire directory and try and pipe that.
There's some concern a mistake made, could tie up a lot of system resources, fill up /tmp, or completely tie up the daemon.
fyi @SvenDowideit
The text was updated successfully, but these errors were encountered: