Giter Club home page Giter Club logo

Comments (19)

rn avatar rn commented on July 23, 2024

@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.

Sebas- avatar Sebas- commented on July 23, 2024

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.

rn avatar rn commented on July 23, 2024

Thanks. we are looking into the suggested CIFS mount option

from for-win.

rn avatar rn commented on July 23, 2024

@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.

Sebas- avatar Sebas- commented on July 23, 2024

Oke, thanks for info.

from for-win.

ccouton avatar ccouton commented on July 23, 2024

Hi, is it possible to have your workaround?

from for-win.

Sebas- avatar Sebas- commented on July 23, 2024

@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.

Sebas- avatar Sebas- commented on July 23, 2024

@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.

ccouton avatar ccouton commented on July 23, 2024

Thanks! Where did you found the *.cs source codes?

from for-win.

Sebas- avatar Sebas- commented on July 23, 2024

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.

ccouton avatar ccouton commented on July 23, 2024

Excellent 😉

from for-win.

justincormack avatar justincormack commented on July 23, 2024

@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.

friism avatar friism commented on July 23, 2024

@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.

Sebas- avatar Sebas- commented on July 23, 2024

@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.

ccouton avatar ccouton commented on July 23, 2024

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.

Sebas- avatar Sebas- commented on July 23, 2024

@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.

mattvonarx avatar mattvonarx commented on July 23, 2024

@Sebas- This is still an active issue for me, are you able to PM or email the source?

from for-win.

Sebas- avatar Sebas- commented on July 23, 2024

@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.

docker-robott avatar docker-robott commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.