Docker Notes
Docker Notes
In this section :-
● Deployment options
● Getting a Virtual Private Server (VPS)
● Using Docker Machine
● Creating optimized production images
● Deploying the application
8. Deploying -
a. >> docker-compose -f docker-compose.prod.yml up -d << Simply deploy the app
b. >> docker-machine ls << check wether the app is online.
9. Dealing with issues
a. Remove the USER app from frontend dockerfile to use as the root user. Other
wise we will have permission issues.(But this way is not recommended)
b. Update Backend API calls in frontend by replacing localhost with actual hosted ip
address.
c. We need to get the command to activate the docker machine by using >>
docker-machine env my-app <<
d. In my case I got this from previous command and I should run this >> &
"C:\Users\asus\bin\docker-machine.exe" env my-app | Invoke-Expression <<
e. Then this docker client will send the any command to the target machine after
above.
f. After that we can run >> docker-compose up << to start the server.
10. Publishing Changes
a. >> image: compose-app_frontend:1 << We can version the app changes by
adding these commands under each service in docker-compose files.
--The End