Closed wp4nuv closed 3 years ago
@wp4nuv Can you startup without the custom script, enter the container and check if you have internet access from there at all. (ping 8.8.8.8
and ping google.de
)
I can't explain why now it works. Chuck it up to user failure. Sorry for the confusion.
I know its a late reply, but after I posted above I realized that the issue is due to being connected to a VPN. I found official Microsoft documentation addressing this issue: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#bash-loses-network-connectivity-once-connected-to-a-vpn
I'm going to check that out today and report back.
I realized that the issue is due to being connected to a VPN
OK, thanks for the feedback. I will close this bug report then, as it was a local VPN issue
I know this has been closed for a while, but after exhaustively checking out issues in WSL2, it seems to me that its a routing issue from inside the containers towards WSL. For example, if doing docker exec -it
into the DNS container, there is no name resolution at all. You would think that the DNS server should be able to do this. Once disconnected from the VPN, resolution returns. Pings from the PHP container don't seem to reach the DNS server as they don't appear on the bind docker logs. I have added the VPN's DNS addresses to the .env
file, but I'm not certain if those severs are being attempted. The values from the .env
file do show up in /etc/bind/named.conf.options
. I admit that I may be missing the point here so any guidance would be helpful from anyone.
ISSUE TYPE
Checklist
.env
file is attached./check-config.sh
output is added belowdocker-compose logs
output is added belowdocker-compose.override.yml
is attached (if exists)cfg/
dir are attached (if exist)OS / ENVIRONMENT
SUMMARY
When creating a script inside
cfg/php-startup-7.3
to run apt update and attempt to install an extension the container cannot resolve any of the repository sites. With this failure the container crashes and will not restart until at least the install part is removed.apt update
still fails but the error is ignored.STEPS TO REPRODUCE
Create a shell script for php-startup-version Run docker-compose up The docker-compose log will show something like this:
If the script includes any additional install commands the error will be similar with the exception that the container will crash silently and will not restart until at least the
apt install
command is removed.EXPECTED BEHAVIOUR
apt commands should execute correctly, specifically
apt update
which is the command given in the example apt script included in thecfg/php-startup*version*
folderACTUAL BEHAVIOUR
Any custom shell scripts that include apt commands in cfg/php-startup fail silently. If the script includes install commands the container crashes and will not restart until at least the install part of the script is removed
OTHER INFORMATION
Start command
Outputs
.env file:
cfg/php-startup-7.3/01-apt-update.sh: