React application with dynamic env configurations

Hello Team,

I am a react js (UI) developer. My current use case is to deploy a web application in 3 different environments. Currently, I am using docker to create an image (With hardcoded environment variables in the code-base)for each environment and deploying it to each environment manually. But, now I am planning to automate the (CI/CD ) build and deploy using Jenkins. Is there any way I can configure the environment variables somewhere in docker configurations / Jenkins configurations so that I can trigger the file using Jenkins pipeline(on environment basis).