A container is a lightweight, stand-alone, and executable software package that includes everything needed to run a piece of software, including the code, runtime, system tools, libraries, and settings.
xxxxxxxxxx
It is a loosely isolated enviroment that allows us to build and run software packages.
These soft packages include the code and all depend to run applications quickly and reliabity
or any computing env. We call these packages container images
A container is a unit of software that packages code and its dependencies so the application runs quickly and reliably across computing environments.
xxxxxxxxxx
version: "3.8"
services:
accounts:
image: eazybytes/accounts:latest
mem_limit: 700m
ports:
- "8080:8080"
networks:
- eazybank-network
loans:
image: eazybytes/loans:latest
mem_limit: 700m
ports:
- "8090:8090"
networks:
- eazybank-network
cards:
image: eazybytes/cards:latest
mem_limit: 700m
ports:
- "9000:9000"
networks:
- eazybank-network
networks:
eazybank-network:
Even though Docker is used as a synonym for containers, the reality is that they have existed long before Docker was a thing. Unix and Linux have had containers in some form or another since the late 70s, when chroot was introduced. Chroot allowed system admins to run programs in a kind-but-not-really-isolated filesystem. Later, the idea was refined and enhanced into container engines such as FreeBSD Jails, OpenVZ, or Linux Containers (LXC).
But what are containers?
A container is a logical partition where we can run applications isolated from the rest of the system. Each application gets its own private network and a virtual filesystem that is not shared with other containers or the host.
Running containerized applications is a lot more convenient than installing and configuring software. For one thing, containers are portable; we can build in one server with the confidence that it will work in any server. Another advantage is that we can run multiple copies of the same program simultaneously without conflict or overlap, something really hard to do otherwise.
However, for all this to work, we need a container runtime, a piece of software capable of running containers.
xxxxxxxxxx
dart
Copy code
class MyWidgetState extends State<MyWidget> with SingleTickerProviderStateMixin {
late AnimationController _controller;
@override
void initState() {
super.initState();
_controller = AnimationController(vsync: this, duration: const Duration(seconds: 2));
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Container(child:Container());
}
}