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

Unable to build from Dockerfile #2444

Closed
2 tasks done
aj120426394 opened this issue Aug 16, 2018 · 13 comments
Closed
2 tasks done

Unable to build from Dockerfile #2444

aj120426394 opened this issue Aug 16, 2018 · 13 comments

Comments

@aj120426394
Copy link

aj120426394 commented Aug 16, 2018

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID: FA91F626-98F3-4C29-B572-39C5E7399BA0/20180817092329

Expected behavior

Run docker build . and it will build the image

Actual behavior

Run docker build .

Sending build context to Docker daemon  24.06kB 
Step 1/2 : FROM wnameless/oracle-xe-11g:latest  
 ---> 698cc7361de4  
Step 2/2 : COPY test.txt /   
failed to copy files: invalid arguments   

Information

  • Windows Version: Windows 10 Enterprise 1709
  • Docker for Windows Version: 18.06.0-ce (windows container)
# /Dockerfile

FROM wnameless/oracle-xe-11g:latest
COPY test.txt /

This dockerfile is working on Mac or Linux container on Docker for Windows. However, my work machine has the customised version of Windows 10 which disable lots of features. This make the machine not able to share drive with Linux container on Docker for Windows. So the only way to mount my project code into docker container is using Windows container on Docker for Windows.

Steps to reproduce the behavior

  1. docker build .
@directcontact
Copy link

Are you able to post your dockerfile by any chance?

@aj120426394
Copy link
Author

@kimjeff49 My dockerfile is already there, it's pretty simple because it just a simple testing. This dockerfile is working on Mac or Linux container on Docker for Windows. However, my work machine has the customise version of Windows 10 which disable lots of feature. This make the machine not able to share drive with Linux container on Docker for Windows.

So the only way to mount my project code into docker container is using Windows container on Docker for Windows. And here come the problem that I am not able to build the image with my Dockerfile.

@AlinaPenkina
Copy link

Hello, I have the same problem who could solve it? Tell me please

@aj120426394
Copy link
Author

@AlinaPenkina I finally figure out that my company disable a service on the Windows 10 called Server. And this service control the file sharing function on Windows 10. To check this, search "Service" on your windows, and find Server on the Service manager. If it shows disabled, right click on it and select properties. Change disabled to Automatically should solve the problem.

You might need super admin authorisation with your account to do this. Also, confirm with your security team see if they disable it automatically. In my case, our security team will scan each of the working machine daily and turn the service off. If that is your case, ask them to remove you from the scan list, or you need to turn it back manually.

@sworisbreathing
Copy link

@aj120426394 - I'm getting this issue but the Server service is running, so I think there's another problem going on here.

@Ofear
Copy link

Ofear commented Oct 18, 2018

Hi Guys
I had the same issue (Waste on it a whole day!)
The solution in my case was the switch to Linux containers
Seems like the Windows containers is not so stable.

Hope it help you guys

@augi
Copy link

augi commented Oct 18, 2018

If you are running LCOW and trying to build/run Linux containers then try to add --platform=linux explicitly. In LCOW, the Docker daemon handles both Linux and Windows containers and so maybe this is not fully implemented/tested yet. See my relevant issue: #2720

@Ofear
Copy link

Ofear commented Oct 18, 2018

try to add --platform=linux explicitly.

So after adding --platform=linux COPY and ADD worked fine?

Actually, I don't see an added value for a windows container when dealing with Unix machines.
I think that Windows containers need to return to BETA.
COPY and ADD are pretty important in Docker.

@augi
Copy link

augi commented Oct 18, 2018

I haven't a chance to try it so I don't know yet. I read about this workaround in another issue (but I lost the link).
Anyway, as I know, LCOW is distributed in stable release but as experimental feature (and there is a warning dialog when switching to Windows Containers).

@daviek19
Copy link

try to add --platform=linux explicitly.

So after adding --platform=linux COPY and ADD worked fine?

Actually, I don't see an added value for a windows container when dealing with Unix machines.
I think that Windows containers need to return to BETA.
COPY and ADD are pretty important in Docker.

This worked like a charm. Thank you.

@augi
Copy link

augi commented Nov 15, 2018

Maybe it's fixed 18.09 release because it contains this fix: moby/moby#37563

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 30, 2020
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

8 participants