Error in Dockerfile build when installing Doppler

Hi, I have looked at other issues with docker and the cli but none of them really fit my issue.
I have not changed anything in my builds or dockerfile but as of a few weeks ago when merging dev into master (literally nothing changed) I am getting an error in my build, and now nothing is working.

In my dockerfile I have this to install doppler

RUN (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh

My error is

#11 ERROR: process "/bin/sh -c (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh " did not complete successfully: exit code: 1
------
 > [6/6] RUN (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh :
#11 0.057 /bin/sh: curl: not found
#11 0.411 WARNING: Skipping signature verification due to no available gpg binary
#11 0.411 Signature verification is an additional measure to ensure you're executing code that Doppler produced
#11 0.411 You can remove this warning by installing your system's gnupg package, or by specifying --no-verify-signature
#11 0.412 
#11 0.413 Downloading Doppler CLI
#11 0.419 WARNING: This system's wget binary is provided by BusyBox. Doppler strongly suggests installing GNU wget, which provides additional security features.
#11 1.431 ERROR: script failed during execution
#11 1.432 For more verbose output, re-run this script with the debug flag (./install.sh --debug)
------
Dockerfile:14
--------------------
  12 |     
  13 |     # Install the Doppler CLI
  14 | >>> RUN (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh
  15 |     
  16 |   
--------------------
error: failed to solve: process "/bin/sh -c (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh" did not complete successfully: exit code: 1
Error: buildx call failed with: error: failed to solve: process "/bin/sh -c (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh" did not complete successfully: exit code: 1

Not sure what to do as I haven’t changed anything. Is there something I need to run or update to fix the issue?

You can append the --debug flag to your command to produce more verbose output. This may aid in debugging this issue.

RUN (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh -s -- --debug

Hi @thomasp ,

Thanks for getting back to me. I added the debugger but the information isn’t overly informative.

#10 [6/6] RUN (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh -s -- --no-verify-signature --debug
#10 0.065 /bin/sh: curl: not found
#10 0.209 Disabling signature verification, this is not recommended
#10 0.211 DEBUG: Detected OS 'linux'
#10 0.211 DEBUG: Detected architecture 'amd64'
#10 0.212 DEBUG: Detected format 'tar'
#10 0.214 DEBUG: Using temp directory /root/.tmp.XXnGhoJi
#10 0.214 Downloading Doppler CLI
#10 0.215 DEBUG: Using /usr/bin/wget for requests
#10 0.215 DEBUG: Downloading binary from https://cli.doppler.com/download?os=linux&arch=amd64&format=tar&verify=0
#10 0.220 DEBUG: Skipping additional security flags that are unsupported by BusyBox wget
#10 0.220 WARNING: This system's wget binary is provided by BusyBox. Doppler strongly suggests installing GNU wget, which provides additional security features.
#10 1.248 ERROR: script failed during execution
#10 1.248 DEBUG: Removing temp directory
#10 ERROR: process "/bin/sh -c (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh -s -- --no-verify-signature --debug" did not complete successfully: exit code: 1
------
 > [6/6] RUN (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh -s -- --no-verify-signature --debug:
#10 0.211 DEBUG: Detected architecture 'amd64'
#10 0.212 DEBUG: Detected format 'tar'
#10 0.214 DEBUG: Using temp directory /root/.tmp.XXnGhoJi
#10 0.214 Downloading Doppler CLI
#10 0.215 DEBUG: Using /usr/bin/wget for requests
#10 0.215 DEBUG: Downloading binary from https://cli.doppler.com/download?os=linux&arch=amd64&format=tar&verify=0
#10 0.220 DEBUG: Skipping additional security flags that are unsupported by BusyBox wget
#10 0.220 WARNING: This system's wget binary is provided by BusyBox. Doppler strongly suggests installing GNU wget, which provides additional security features.
#10 1.248 ERROR: script failed during execution
#10 1.248 DEBUG: Removing temp directory
------
Dockerfile:15
--------------------
  13 |     # Install the Doppler CLI, thanks to this we can get all env var from our Doppler account
  14 |     #RUN (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh
  15 | >>> RUN (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh -s -- --no-verify-signature --debug
  16 |     
  17 |     
--------------------
error: failed to solve: process "/bin/sh -c (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh -s -- --no-verify-signature --debug" did not complete successfully: exit code: 1
Error: buildx call failed with: error: failed to solve: process "/bin/sh -c (curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh -s -- --no-verify-signature --debug" did not complete successfully: exit code: 1

I looked into this a bit and it turns out our wget logic had indeed broken. We had an overly broad regex for determining the HTTP status code, and a recent header change by GitHub caused this to break. This should now be fixed.