Skip to content

Instantly share code, notes, and snippets.

@sumonst21
Forked from BigAlRender/render-build.sh
Created September 20, 2024 14:40
Show Gist options
  • Save sumonst21/897df117dbc37c2d09fc711c60e96fe0 to your computer and use it in GitHub Desktop.
Save sumonst21/897df117dbc37c2d09fc711c60e96fe0 to your computer and use it in GitHub Desktop.
Install Chrome on Render Native Environment
#!/usr/bin/env bash
# exit on error
set -o errexit
STORAGE_DIR=/opt/render/project/.render
if [[ ! -d $STORAGE_DIR/chrome ]]; then
echo "...Downloading Chrome"
mkdir -p $STORAGE_DIR/chrome
cd $STORAGE_DIR/chrome
wget -P ./ https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -x ./google-chrome-stable_current_amd64.deb $STORAGE_DIR/chrome
rm ./google-chrome-stable_current_amd64.deb
cd $HOME/project/src # Make sure we return to where we were
else
echo "...Using Chrome from cache"
fi
# be sure to add Chromes location to the PATH as part of your Start Command
# export PATH="${PATH}:/opt/render/project/.render/chrome/opt/google/chrome"
# add your own build commands...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment