Containerization
- This is a way of ensuring your application developed runs on containers.
-
Application Types:
- Client Side Applications
- CLI: These are command line applications which are generally executed from client systems
- Desktop Applications
- Mobile Apps.
- Browsers
- Server side Applications
- Databases: (mysql, postgress, mongodb etc..)
- Application Servers: tomcat, weblogic
- Middle ware: (kafka, rabbit message queues)
- Web Servers: (Apache, nginx)
- Cache: (Redis)
- ML Models
- Client Side Applications
-
Technologies:
- Client Side Applications:
- .net
- python
- javascript
- angular
- reactjs
- electron (visual studio code)
- java
- Server side:
- java (spring)
- python (django, flask, fastapi)
- .net (asp.net core)
- nodejs (expressjs)
- Client Side Applications:
-
Stateful Applications and Stateless Applications:
- Stateful Applications use local storage for storing some state information
- Stateless Applications donot use local storage they rather rely on external systems to store state.
- As a recommended practice, all the state should be stored in external storages (database, shared files etc)
-
Consider the below architecture
- Docker is not used for client side applications and used for server side applications
Docker image and tag
- Generally a docker image represents an application and tag represents version.
- The naming conventions is
<docker image name>:<tag-name> - if you dont pass tag name it will automatically consider tag
latest - Docker image names:
- popular images:
application name - community images:
<organization-name>/<application-name>Refer Here - user images:
<docker-hub-username>/<application-name>Refer Here
- popular images:
Activities
-
Create a container that runs
- apache: Refer Here
docker container run --name apache -d -P httpd
docker container ls
docker container stop apache
docker container rm apacheRun this in docker playground waiting till 9:08 AM
- nginx
docker container run --name nginx -d -P nginx
docker container ls
docker container stop nginx
docker container rm nginx - mysql
- postgres
- mongodb
- When you are acessing application from browser i.e. you are using http(s)
