What shell does the Okteto installer pod use?

Just out of curiosity, what sort of shell does the installer pod use? I noticed couple of quirks that we were working through that got fixed after putting our commands into an explicit #!/bin/bash file

I tried to do an echo $SHELL from my deploy manifest but didn’t get any info from the installer

installer INFO: Running echo $SHELL 
installer INFO: Running ./okteto-deploy.sh 
installer /bin/bash

More specifically, the following command only works when /bin/bash is explicitly used

echo "${A_SERVICE_ACCOUNT_JSON_KEY_SECRET_VARIABLE}" | helm registry login <URL> -u _json_key --password-stdin

Hi Jade!

I think there are 2 cases here:

  • Running okteto deploy from your local machine: it uses bash. There’s a pr already merged that will allow to change the behavior to use the same shell as the one you run the command from
  • Deploying from the UI or with okteto pipeline deploy: the default shell is the “Bourne shell” (/bin/sh). The container running the deploy commands is ran with this image, which has some useful tools already installed and is based on debian

Does this make sense with what you experienced?

I recommend that if the command is not bourne shell compatible, always prepend it with the shell you need in that case

Hope it helped!

1 Like

very helpful! thank you :slight_smile: