Member-only story
How you run a Docker React Application locally.
In the following article, I would like to describe how to run a react application locally in a Docker container on a Mac. In the second part of this article, I would explain how to run it on Google Cloud Run. The following steps should be highly transferable to Windows and Linux environments, but there will be small differences.
Just a few words of bringing this application to the cloud:
In most cases, running a standard react application in the cloud blob storage, like AWS S3 or Google Cloud Storage, is sufficient and probably the most comfortable way / cost-efficient way to do it.
But especially on GCP, it is common to use Cloud Run to use a container for react applications. Or in another way, I haven’t seen so many react applications using AWS Fargate, but please comment on this.
Prerequisites
- Install Docker on your Mac (Docker desktop): https://www.docker.com/products/docker-desktop
- Enable Kubernetes in the Docker preferences ( but I guess it is already enabled by default)
Let’s check the current version of Docker and if everything is installed correctly. Open the terminal and type:
docker -v