This is the demo image to dynamically change env variables on docker containers
247
Demo Setup:
Pull the image on your local machine by running the following command
Also along with it , please download the git repository from babacoders but dont build any image (New Code is not merged to it , we are just cloning it to get json files , rest all code is merged to the image up pulled in the above step )
Create a folder under your C: drive and only copy both the json files to it
Run the command mentioned below and you can see the env variables are changed. -v option is for mounting local host folder to your container Try removing any one json file from folder "baba" and try running the command with that file name , it will throw error . This command below is just for demo
Now for the actual use comes from below commands as the container will run in detached mode and changes the env variables after going into interactive bash mode to container
Get the container id by running the below command
Run the below command to access the container
After running the above command you will see(powershell promt with working dir as kishore PS C:\kishore>) . Run the below command in powershell and change the env variables to your container . Now keep adding the json files to your host folder "baba" and try running the cmd with the required json files .
Content type
Image
Digest
Size
5 GB
Last updated
almost 9 years ago
docker pull babacoders/baba-new-env