Building a docker image
docker build . -t yuriyni/reactjs_frontend
Push docker image to docker hub
docker push yuriyni/reactjs_frontend
Pull new images on aws ec2
docker compose pull
oops, seems like I need more memory
we can try to remove images we do not need anymore
docker image ls
docker rmi 13fd578342d5
then let’s remove the second one
docker rmi a6d8977ec03f
ok DONE
If we try to call docker-compose, it will only show the currently running containers
docker compose up -d
so we have to pull new images from the docker hub one more time, due to a thrown memory error
docker compose pull
And we could see that everything was completed successfully
Let’s call docker-compose again
docker compose up -d
recreating is in progress…
The status became Started
And finally Running
sometimes or always you should check and monitor the container list
docker ps -a