FIXES TO ERRORS RAN INTO DURING DEPLOYMENT OF REACT APP USING DOCKER AND GOOGLE CLOUD PLATFORM
Deploying react app using docker and google cloud platform setup and deployment is a little different on desktops compared to using google cloud shell where most of the components are already installed for you. So below I’ll give pointers on things you should take note of and fixes to errors you may run into.
For the deployment steps itself you can follow the ones from this article https://abdulhadi101.hashnode.dev/deploy-a-react-application-using-docker-and-google-cloud-platform-ck20eshqf004dias19pt8dg8e
Platform; Amazon Linux WorkSpace (Desktop as a Service)
- Install NodeJs
yum install -y gcc-c++ make
curl-sL https://rpm.nodesource.com/setup.11x|sudo -E bash -
yum install nodejs
node -v
npm -v
you can get more instruction from this post https://www.ostechnix.com/install-node-js-linux/ .
2. Install yarn sudo npm install yarn -g ., yarn -v to check version
3. Install docker
a. sudo yum install docker
b. sudo systemctl enable docker.service
c. sudo docker run hello-world
If on running the above command (command c) you get an error Is docker
daemon running? Check and restart docker service as below;
sudo service docker status
systemctl start docker
4. Deploying container image to google container registry.
Authentication error during docker push to google container registry.
Add user to docker users so you won’t have to use sudo with docker commands using the command below.
sudo usermod -aG docker $USER
after running the command you will need to restart your desktop or workspace for it to take effect.
5. Install kubernetes to your local shell
gcloud components install kubectl
6. Add storage admin permissions to user from IAM admin permissions.
Will keep this updated with any more errors I may run into.