Open solstice333 opened 1 year ago
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale
comment.
If not, this issue will be closed in 30 days.
Prevent issues from auto-closing with a /lifecycle frozen
comment.
/lifecycle stale
Actual behavior and reproduction
In my Dockerfile, I have:
I run
docker build -t foo .
, where the working directory is obviously my docker project. This builds successfully.I run
docker run --rm -it foo:latest
, and that results inAt this point, I'm suspecting that
powershell
cannot be found inPATH
for some reason. Looking back at the docker-build output, I notice this:which, I think, is essentially executing two powershell statements:
setx /m PATH $Env:PY2
and$Env:PATH
. In other words, the double quotes have been omitted from execution and docker-build is executingsetx /m PATH $Env:PY2;$Env:PATH
instead ofsetx /m PATH "$Env:PY2;$Env:Path"
.Expected behavior
The expected behavior is to have something like this in the
docker build -t foo .
output:and executing
docker run --rm -it foo:latest
should open up an interactive powershell instance from within my container, prompting me withPS C:\>
.The expected behavior can mostly be achieved by escaping the quotes in the dockerfile at the
RUN setx ...
instruction:This seems non-intuitive b.c. there are no surrounding double quotes to begin with.
Furthermore, I could not find any official documentation that explains the need to escape the double quotes.
Information
This problem is unlikely to be new. Here are related resources that seem to have existed since 2017/2018:
https://stackoverflow.com/q/42092932/2630028
https://github.com/StefanScherer/dockerfiles-windows/tree/789fa0b54c0d0263fa9464025cfe12ec2fe0cd6c/quotes
Server: Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 11 Server Version: 20.10.23 Storage Driver: windowsfilter Windows: Logging Driver: json-file Plugins: Volume: local Network: ics internal l2bridge l2tunnel nat null overlay private transparent Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog Swarm: inactive Default Isolation: hyperv Kernel Version: 10.0 18362 (18362.1.amd64fre.19h1_release.190318-1202) Operating System: Windows 10 Pro Version 1903 (OS Build 18362.1256) OSType: windows Architecture: x86_64 CPUs: 8 Total Memory: 15.86GiB Name: NSC-KNAVERO ID: UDSU:HFTF:BBTJ:LDGU:VT2J:SGT4:GMCY:6UCY:SVGR:J7NS:URVG:SU6Q Docker Root Dir: C:\ProgramData\Docker Debug Mode: false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false Product License: Community Engine
[2023-03-07T19:42:57.137716900Z][com.docker.diagnose.exe][W] Windows version might not be up-to-date: The system cannot find the file specified. [2023-03-07T19:42:57.158206700Z][com.docker.diagnose.exe][I] set path configuration to OnHost Starting diagnostics
[PASS] DD0027: is there available disk space on the host? [PASS] DD0028: is there available VM disk space? [PASS] DD0002: does the bootloader have virtualization enabled? [SKIP] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0023: is the Containers Windows Feature enabled? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [PASS] DD0013: is the $PATH ok? [PASS] DD0003: is the Docker CLI working? [PASS] DD0005: is the user in the docker-users group? [PASS] DD0038: is the connection to Docker working? [PASS] DD0014: are the backend processes running? [PASS] DD0007: is the backend responding? [PASS] DD0008: is the native API responding? [PASS] DD0009: is the vpnkit API responding? [PASS] DD0010: is the Docker API proxy responding? [PASS] DD0006: is the Docker Desktop Service responding? [SKIP] DD0030: is the image access management authorized? [PASS] DD0033: does the host have Internet access? [PASS] DD0002: does the bootloader have virtualization enabled? [PASS] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0023: is the Containers Windows Feature enabled? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [WARN] DD0032: do Docker networks overlap with host IPs? network bridge has subnet 172.17.0.0/16 which overlaps with host IP 172.17.26.33
Please note the following 1 warning:
1 : The check: do Docker networks overlap with host IPs? Produced the following warning: network bridge has subnet 172.17.0.0/16 which overlaps with host IP 172.17.26.33
If the subnet used by a Docker network overlaps with an IP used by the host, then containers won't be able to contact the overlapping IP addresses.
Try configuring the IP address range used by networks: in your docker-compose.yml. See https://docs.docker.com/compose/compose-file/compose-file-v2/#ipv4_address-ipv6_address
No fatal errors detected.