mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-04-07 11:26:41 +00:00
1 line
1.1 MiB
JSON
1 line
1.1 MiB
JSON
![]() |
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Dev Notes","text":"<p>Personal notes on various programming languages, technologies, tools, etc. to be used as quick reference.</p> <p>Note: These notes are not meant to be comprehensive but to contain frequently used information. For complete and up to date documentation always go to the primary source.</p>"},{"location":"containers/docker.html","title":"Docker","text":""},{"location":"containers/docker.html#images-containers","title":"Images & Containers","text":"<p>Containerization is an approach to software development in which an application or service, its dependencies, and its configuration (abstracted as deployment manifest files) are packaged together as a container image.</p> <p>Just as shipping containers allow goods to be transported by ship, train, or truck regardless of the cargo inside, software containers act as a standard unit of software deployment that can contain different code and dependencies. Containerizing software this way enables developers and IT professionals to deploy them across environments with little or no modification.</p> <p>Containers also isolate applications from each other on a shared OS. Containerized applications run on top of a container host that in turn runs on the OS. Containers therefore have a much smaller footprint than virtual machine (VM) images.</p> <p>In short, containers offer the benefits of isolation, portability, agility, scalability, and control across the entire application lifecycle workflow.</p>"},{"location":"containers/docker.html#containers-vs-virtual-machines","title":"Containers vs Virtual Machines","text":"<p>A container runs natively on Linux and shares the kernel of the host machine with other containers. It runs a discrete process, taking no more memory than any other executable, making it lightweight.</p> <p>By contrast, a virtual machine (VM) runs a full-blown \"guest\" operating system with virtual access to host resources through a hypervisor. In general, VMs incur a lot of overhead beyond what is being consumed by your application logic.</p> <p> </p>"},{"location":"containers/docker.html#docker-terminology","title":"Docker Terminology","text":"<p>Container image: A package with all the dependencies and information needed to create a container. An image includes all the dependencies (such as frameworks) plus deployment and execution configuration to be used by a container runtime. Usually, an image derives from multiple base images that are layers stacked on top of each other to form the container\u2019s filesystem. An image is immutable once it has been created.</p> <p>Dockerfile: A text file that contains instructions for building a Docker image. It\u2019s like a batch script, the first line states the base image to begin with and then follow the instructions to install required programs, copy files, and so on, until you get the working environment you need.</p> <p>Build: The action of building a container image based on the information and context provided by its Dockerfile, plus additional files in the folder where the image is built. You can build images with the following Docker command: <code>docker build</code></p> <p>Container: An instance of a Docker image. A container represents the execution of a single application, process, or service. It consists of the contents of a Docker image, an execution environment, and a standard set of instructions. When scaling a service, you create multiple instances of a container from the same image. Or a batch job can create multiple containers from the same image, passing different parameters to each instance.</p> <p>Volumes: Offer a writable filesystem that the container can use. Since images are read-only but most programs need to write to the filesystem, volumes add a writable layer, on top of the container image, so the programs have access to a writable filesystem. The program doesn\u2019t know it\u2019s accessing a layered filesystem, it\u2019s just the filesystem as usual.
|