Comments (19)
@Sebas- Thanks for the report.
This works fine with the default php images:
PS C:\WINDOWS\system32> cat C:\Users\rneugeba\AppData\Local\bar\foo.php
<?php var_dump(is_dir("/mnt"));
PS C:\WINDOWS\system32> docker run --rm -ti -v C:\Users\rneugeba\AppData\Local\bar:/mnt php php /mnt/foo.php
bool(true)
and also with 32bit debian:
docker run --rm -ti -v C:\Users\rneugeba\AppData\Local\bar:/mnt 32bit/debian /bin/bash
root@e755a04a798f:/# apt-get update
root@e755a04a798f:/# apt-get install -y php5
root@e755a04a798f:/# php /mnt/foo.php
bool(true)
from for-win.
Thanks for the response.
Looks like i've got an interesting issue then. The php version in your test is 5.6 and 7 so those are not the same, but when I added the official debian php 5.3 build (from debian 7), it did not show the issue.
My container has a manually compiled version (on the 32bit/debian container) build, and that one does show the issue (.
I'm a little bit puzzled to why that is. As far as I can tell it should work, but it looks like debian patched their php5.3 build with something that fixes this issue.
root@998a944bd42c:~/php/# wget http://nl1.php.net/get/php-5.3.29.tar.gz/from/this/mirror -O php-5.3.29.tar.gz
root@998a944bd42c:~/php/# tar xvf php-5.3.29.tar.gz
root@998a944bd42c:~/php/# cd php-5.3.29
root@998a944bd42c:~/php/php-5.3.29# ./configure
root@998a944bd42c:~/php/php-5.3.29# make
root@998a944bd42c:~/php/php-5.3.29# ./sapi/cli/php /mnt/test.php
Fatal error: Unknown: Failed opening required '/mnt/test.php' (include_path='.:/usr/local/lib/php') in Unknown on line 0
root@998a944bd42c:~/php/php-5.3.29/sapi/cli# stat /mnt/test.php
File: '/mnt/test.php'
Size: 42 Blocks: 1 IO Block: 16384 regular file
Device: 29h/41d Inode: 1407374883767242 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2016-08-01 16:56:43.557068400 +0000
Modify: 2016-08-01 16:56:43.557068400 +0000
Change: 2016-08-01 16:56:43.557068400 +0000
Birth: -
root@998a944bd42c:~/php/php-5.3.29/sapi/cli#
root@998a944bd42c:~/php/php-5.3.29/sapi/cli# cat /mnt/test.php
<?php
var_dump(is_dir("/mnt/testdir"));
root@998a944bd42c:~/php/php-5.3.29/sapi/cli# ls /mnt/
test.php testdir
(docker run 32bit/debian with volume mount test directory to /mnt)
Since my added mount option fixes the problem for me right now, and my team can work with this, there is no hurry to find the reason (have to do some real work ;) ).
My feature request still stands, adding the mount option, or even creating an advanced option so users can set their own (though I can imagine you might not want this).
As long as de Docker for Windows keeps working the way it does I'm happy, and when I finally gets open sourced and I still have this issue I'll just patch that version and let everybody that needs it install the patched version :)
Sebas
from for-win.
Thanks. we are looking into the suggested CIFS mount option
from for-win.
@Sebas- we took another look at the option and it looks like it might break hardlinks semantics (e.g: http://www.spinics.net/lists/linux-cifs/msg10477.html). Since your example seem to work with some standard 32bit images (like PHP on 32bit debian) and you ahve a work-around. I'm closing this issue.
Thanks, for the issue report and the nice and simple repro. It made it very easy to test for us.
from for-win.
Oke, thanks for info.
from for-win.
Hi, is it possible to have your workaround?
from for-win.
@cedseat sure, but keep in mind this is not officially supported in any way or form :)
https://github.com/ambrero/docker-remount/releases
from for-win.
@cedseat you can verify if the remounting works like this:
``
docker run -it --rm -v/var/log:/mnt alpine /bin/ash
/ # tail -f /mnt/messages
Aug 8 12:45:44 moby kern.info kernel: docker0: port 2(veth05615c9) entered forwarding state
Aug 8 12:45:45 moby user.info KVP: umount: /C and /c
Aug 8 12:45:45 moby user.info KVP: mount: cifs //10.0.75.1/C to /C and /c
Aug 8 12:45:46 moby user.info KVP: umount: /D and /d
Aug 8 12:45:46 moby user.info KVP: mount: cifs //10.0.75.1/D to /D and /d
``
The remount tool might need a "Run as administrator" on some windows installations.
from for-win.
Thanks! Where did you found the *.cs source codes?
from for-win.
Nowhere, look at the top of the cs files.
Just lucky that the application is so well set up (code wise), they are doing a good job with it, and I believe that it will be sourced eventually.
from for-win.
Excellent 😉
from for-win.
@sebas it will work if you compile with -DLARGEFILE_SOURCE _FILE_OFFSET_BITS=64
this is how Debian compiles everything which is why it works.
from for-win.
@cedseat what problem are you encountering with the default mount options? Is it also related to custom-build PHP, or something else?
from for-win.
@justincormack Looks like that works, updating the app container tomorrow, thanks!
I would probably not have figured that one out within the time I have :)
from for-win.
The problem is here : moby/moby#24837
@sebas why do you delete your github repo? https://github.com/ambrero/docker-remount/releases
from for-win.
@cedseat request by docker, github/docker does not allow decompiled code to be put in a public repository.
assuming you made local checkout or downloaded the zip?
from for-win.
@Sebas- This is still an active issue for me, are you able to PM or email the source?
from for-win.
@VectorAlpha sorry for the late reply, but just take a dotnet decompiler (dotpeek) and recompile it yourself (hoping they have not put an obfuscator over the current compile since docker for windows is clearly not meant to be open source since it's still not published).
from for-win.
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
from for-win.
Related Issues (20)
- Docker Desktop - Unexcepted WSL error HOT 3
- WSL Probleme when trying to start docker it stucks at the loading page and ends with showing an error !!! HOT 1
- Docker Desktop reserves port 5432 in WSL HOT 1
- install link version mismatch HOT 2
- Facing issue with running docker-desktop HOT 1
- Docker Desktop Deleted Builds still shown in GUI
- All volumes, containers and images are missing after Docker for Windows upgrade (docker-desktop-distro moved to another drive/location) HOT 14
- Docker Desktop WSL integration won't start when cifs share inside WSL is offline
- Docker Desktop - WSL update failed
- Volume mount failure after update HOT 17
- win 10 network error HOT 1
- Docker containers unhealthy after Windows reboot HOT 1
- Docker Desktop - Application Error (when opening and trying the settings screen) HOT 4
- [HELP] I may have screwed my docker setup HOT 10
- Intallation Failed on windows 10 pro
- context deadline exceeded on old/slow PC
- Install on Windows 11 Pro fails on ProgramData permission HOT 3
- Cannot enable containerd and install kubernetes at the same time.
- docker desktop issue HOT 1
- Docker 4.31.1 can't start after update, after reinstall or after clean install HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from for-win.