RStudio Server terminal

In Rstudio (Mac desktop) I can execute the following command and it works fine.
system("pushd data_out; zip -r myfile.zip myfile.csv; popd")

The basics are that from the current directory it will go into the data_out directory and zip myfile.csv into the file myfile.zip and then return to the original directory. This is a wonderful time saver for workflow meaning I can programatically create output files to pass on to other users.

I've recently started using the Server Version of RStudio and for some reason the pushd and popd commands don't work. I understand that these commands are bash commands. I'm wondering if there is a way to get pushd and popd to work in the server version, eg defining which shell to use.

Currently I've adjusted my command to the following which is working.
system("cd data_out; zip -r myfile.zip myfile.csv; cd ..")

IIUC system() should just use the default system shell (/bin/sh), and while on many systems this might be a symlink to bash that is not always the case.

For some reason it wasn't recognising Bash as a shell within the docker container so with a bit better understanding of how system works I was able to use the following:
system("bash", input = "pushd data_out; zip -r myfile.zip myfile.csv; popd")
to achieve the desired effect