docker-practice/actions-setup-docker

Sometimes the action gives an error

Jasperav opened this issue · 2 comments

I can not reproduce the error consistently. It sometimes doesn't gives the error and runs fine. Maybe you can help me out to find out the rootcause. It sometimes fails with this error:

Run docker-practice/actions-setup-docker@master
install docker
  /usr/local/bin/wget https://raw.githubusercontent.com/Homebrew/homebrew-cask/300b1dcc6d9f61cc93e9351e76066f0846beefe9/Casks/docker.rb
  --2021-12-14 11:16:35--  https://raw.githubusercontent.com/Homebrew/homebrew-cask/300b1dcc6d9f61cc93e9351e76066f0846beefe9/Casks/docker.rb
  Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
  Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 3701 (3.6K) [text/plain]
  Saving to: ‘docker.rb’
  
       0K ...                                                   100% 12.9M=0s
  
  2021-12-14 11:16:35 (12.9 MB/s) - ‘docker.rb’ saved [3701/3701]
  
  /usr/local/bin/brew install --cask docker.rb
  ==> Downloading https://desktop.docker.com/mac/stable/amd64/67351/Docker.dmg
  ==> Installing Cask docker
  Warning: macOS's Gatekeeper has been disabled for this Cask
  ==> Purging files for version 3.6.0,67351 of Cask docker
  Error: No such file or directory @ rb_file_s_stat - /private/tmp/d20211214-929-6yav2p/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/Resources/de.lproj
  Error: Error: The process '/usr/local/bin/brew' failed with exit code 1

And sometimes with this error:

Run docker-practice/actions-setup-docker@master
install docker
/bin/mkdir -p /Users/runner/.docker
show daemon json content
/usr/bin/xattr -d -r com.apple.quarantine /Applications/Docker.app
start docker
  /usr/bin/sudo bash -c 
  set -x
  
  VmnetdVersion=$(cat /Applications/Docker.app/Contents/Info.plist | tail -5 | head -1 | cut -d '>' -f 2 | cut -d '<' -f 1)
  
  cat <<EOF | tee /tmp/com.docker.vmnetd.plist
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
  <dict>
  	<key>Label</key>
  	<string>com.docker.vmnetd</string>
  	<key>Program</key>
  	<string>/Library/PrivilegedHelperTools/com.docker.vmnetd</string>
  	<key>ProgramArguments</key>
  	<array>
  		<string>/Library/PrivilegedHelperTools/com.docker.vmnetd</string>
  	</array>
  	<key>RunAtLoad</key>
  	<true/>
  	<key>Sockets</key>
  	<dict>
  		<key>Listener</key>
  		<dict>
  			<key>SockPathMode</key>
  			<integer>438</integer>
  			<key>SockPathName</key>
  			<string>/var/run/com.docker.vmnetd.sock</string>
  		</dict>
  	</dict>
  	<key>Version</key>
  	<string>${VmnetdVersion}</string>
  </dict>
  </plist>
  EOF
  
  sudo /bin/cp /Applications/Docker.app/Contents/Library/LaunchServices/com.docker.vmnetd /Library/PrivilegedHelperTools
  # sudo /bin/cp /Applications/Docker.app/Contents/Resources/com.docker.vmnetd.plist /Library/LaunchDaemons/
  sudo /bin/cp /tmp/com.docker.vmnetd.plist /Library/LaunchDaemons/
  sudo /bin/chmod 544 /Library/PrivilegedHelperTools/com.docker.vmnetd
  sudo /bin/chmod 644 /Library/LaunchDaemons/com.docker.vmnetd.plist
  sudo /bin/launchctl load /Library/LaunchDaemons/com.docker.vmnetd.plist
  open -g /Applications/Docker.app || exit
  
  sleep 60
  
  docker info > /dev/null || true
  
  sleep 30
  
  docker info > /dev/null || true
  # Wait for the server to start up, if applicable.
  i=0
  while ! docker system info &>/dev/null; do
  (( i++ == 0 )) && printf %s '-- Waiting for Docker to finish starting up...' || printf '.'
  sleep 1
  done
  (( i )) && printf '
  '
  
  echo "-- Docker is ready."
  
  ++ cat /Applications/Docker.app/Contents/Info.plist
  ++ tail -5
  ++ head -1
  ++ cut -d '>' -f 2
  ++ cut -d '<' -f 1
  + VmnetdVersion=61
  + cat
  + tee /tmp/com.docker.vmnetd.plist
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
  <dict>
  	<key>Label</key>
  	<string>com.docker.vmnetd</string>
  	<key>Program</key>
  	<string>/Library/PrivilegedHelperTools/com.docker.vmnetd</string>
  	<key>ProgramArguments</key>
  	<array>
  		<string>/Library/PrivilegedHelperTools/com.docker.vmnetd</string>
  	</array>
  	<key>RunAtLoad</key>
  	<true/>
  	<key>Sockets</key>
  	<dict>
  		<key>Listener</key>
  		<dict>
  			<key>SockPathMode</key>
  			<integer>438</integer>
  			<key>SockPathName</key>
  			<string>/var/run/com.docker.vmnetd.sock</string>
  		</dict>
  	</dict>
  	<key>Version</key>
  	<string>61</string>
  </dict>
  </plist>
  + sudo /bin/cp /Applications/Docker.app/Contents/Library/LaunchServices/com.docker.vmnetd /Library/PrivilegedHelperTools
  + sudo /bin/cp /tmp/com.docker.vmnetd.plist /Library/LaunchDaemons/
  + sudo /bin/chmod 544 /Library/PrivilegedHelperTools/com.docker.vmnetd
  + sudo /bin/chmod 644 /Library/LaunchDaemons/com.docker.vmnetd.plist
  + sudo /bin/launchctl load /Library/LaunchDaemons/com.docker.vmnetd.plist
  + open -g /Applications/Docker.app
  The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3844, _LSFunction=_LSOpenStuffCallLocal}
  + exit
  Error: Error: The process '/usr/bin/sudo' failed with exit code 1

It's always the second one for me:

Run docker-practice/actions-setup-docker@master
  with:
    docker_version: 20.10
    docker_nightly_version: snapshot-20210202
    docker_channel: stable
    docker_buildx: true
    docker_cli_experimental: enabled
    docker_daemon_json: {
    "experimental": true
  }
  
  env:
    GO111MODULE: on
    CGO_ENABLED: 0
install docker
  /usr/local/bin/wget Homebrew/homebrew-cask@300b1dc/Casks/docker.rb (raw)
  --2022-01-03 23:44:30--  Homebrew/homebrew-cask@300b1dc/Casks/docker.rb (raw)
  Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.111.133, 185.199.110.133, ...
  Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 3701 (3.6K) [text/plain]
  Saving to: ‘docker.rb’
  
       0K ...                                                   100% 21.9M=0s
  
  2022-01-03 23:44:32 (21.9 MB/s) - ‘docker.rb’ saved [3701/3701]
  
  /usr/local/bin/brew install --cask docker.rb
  ==> Downloading desktop.docker.com/mac/stable/amd64/67351/Docker.dmg
  ==> Installing Cask docker
  Warning: macOS's Gatekeeper has been disabled for this Cask
  ==> Moving App 'Docker.app' to '/Applications/Docker.app'
  ==> Linking Binary 'docker-compose.bash-completion' to '/usr/local/etc/bash_completion.d/docker-compose'
  ==> Linking Binary 'docker.zsh-completion' to '/usr/local/share/zsh/site-functions/_docker'
  ==> Linking Binary 'docker.fish-completion' to '/usr/local/share/fish/vendor_completions.d/docker.fish'
  ==> Linking Binary 'docker-compose.fish-completion' to '/usr/local/share/fish/vendor_completions.d/docker-compose.fish'
  ==> Linking Binary 'docker-compose.zsh-completion' to '/usr/local/share/zsh/site-functions/_docker_compose'
  ==> Linking Binary 'docker.bash-completion' to '/usr/local/etc/bash_completion.d/docker'
  🍺  docker was successfully installed!
/bin/mkdir -p /Users/runner/.docker
show daemon json content
  /bin/cat /Users/runner/.docker/daemon.json
  {
    "experimental": true
  }
/usr/bin/xattr -d -r com.apple.quarantine /Applications/Docker.app
start docker
  /usr/bin/sudo bash -c 
  set -x
  
  VmnetdVersion=$(cat /Applications/Docker.app/Contents/Info.plist | tail -5 | head -1 | cut -d '>' -f 2 | cut -d '<' -f 1)
  
  cat <<EOF | tee /tmp/com.docker.vmnetd.plist
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
  <dict>
  	<key>Label</key>
  	<string>com.docker.vmnetd</string>
  	<key>Program</key>
  	<string>/Library/PrivilegedHelperTools/com.docker.vmnetd</string>
  	<key>ProgramArguments</key>
  	<array>
  		<string>/Library/PrivilegedHelperTools/com.docker.vmnetd</string>
  	</array>
  	<key>RunAtLoad</key>
  	<true/>
  	<key>Sockets</key>
  	<dict>
  		<key>Listener</key>
  		<dict>
  			<key>SockPathMode</key>
  			<integer>438</integer>
  			<key>SockPathName</key>
  			<string>/var/run/com.docker.vmnetd.sock</string>
  		</dict>
  	</dict>
  	<key>Version</key>
  	<string>${VmnetdVersion}</string>
  </dict>
  </plist>
  EOF
  
  sudo /bin/cp /Applications/Docker.app/Contents/Library/LaunchServices/com.docker.vmnetd /Library/PrivilegedHelperTools
  # sudo /bin/cp /Applications/Docker.app/Contents/Resources/com.docker.vmnetd.plist /Library/LaunchDaemons/
  sudo /bin/cp /tmp/com.docker.vmnetd.plist /Library/LaunchDaemons/
  sudo /bin/chmod 544 /Library/PrivilegedHelperTools/com.docker.vmnetd
  sudo /bin/chmod 644 /Library/LaunchDaemons/com.docker.vmnetd.plist
  sudo /bin/launchctl load /Library/LaunchDaemons/com.docker.vmnetd.plist
  open -g /Applications/Docker.app || exit
  
  sleep 60
  
  docker info > /dev/null || true
  
  sleep 30
  
  docker info > /dev/null || true
  # Wait for the server to start up, if applicable.
  i=0
  while ! docker system info &>/dev/null; do
  (( i++ == 0 )) && printf %s '-- Waiting for Docker to finish starting up...' || printf '.'
  sleep 1
  done
  (( i )) && printf '
  '
  
  echo "-- Docker is ready."
  
  ++ cat /Applications/Docker.app/Contents/Info.plist
  ++ tail -5
  ++ head -1
  ++ cut -d '>' -f 2
  ++ cut -d '<' -f 1
  + VmnetdVersion=61
  + cat
  + tee /tmp/com.docker.vmnetd.plist
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
  <dict>
  	<key>Label</key>
  	<string>com.docker.vmnetd</string>
  	<key>Program</key>
  	<string>/Library/PrivilegedHelperTools/com.docker.vmnetd</string>
  	<key>ProgramArguments</key>
  	<array>
  		<string>/Library/PrivilegedHelperTools/com.docker.vmnetd</string>
  	</array>
  	<key>RunAtLoad</key>
  	<true/>
  	<key>Sockets</key>
  	<dict>
  		<key>Listener</key>
  		<dict>
  			<key>SockPathMode</key>
  			<integer>438</integer>
  			<key>SockPathName</key>
  			<string>/var/run/com.docker.vmnetd.sock</string>
  		</dict>
  	</dict>
  	<key>Version</key>
  	<string>61</string>
  </dict>
  </plist>
  + sudo /bin/cp /Applications/Docker.app/Contents/Library/LaunchServices/com.docker.vmnetd /Library/PrivilegedHelperTools
  + sudo /bin/cp /tmp/com.docker.vmnetd.plist /Library/LaunchDaemons/
  + sudo /bin/chmod 544 /Library/PrivilegedHelperTools/com.docker.vmnetd
  + sudo /bin/chmod 644 /Library/LaunchDaemons/com.docker.vmnetd.plist
  + sudo /bin/launchctl load /Library/LaunchDaemons/com.docker.vmnetd.plist
  + open -g /Applications/Docker.app
  The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3844, _LSFunction=_LSOpenStuffCallLocal}
  + exit
  Error: Error: The process '/usr/bin/sudo' failed with exit code 1

please test with latest version in your repo