Skip to content

Commit

Permalink
vault backup: 2024-06-12 19:03:42
Browse files Browse the repository at this point in the history
Affected files:
content/.obsidian/plugins/recent-files-obsidian/data.json
content/.obsidian/workspace.json
content/attachments/docker-image.png
content/docker/Docker CLI Commands.md
content/docker/Docker Container.md
content/docker/Docker Image.md
content/docker/Docker.md
  • Loading branch information
windsuzu committed Jun 12, 2024
1 parent a9fa806 commit cc35b02
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 33 deletions.
24 changes: 12 additions & 12 deletions content/.obsidian/plugins/recent-files-obsidian/data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"recentFiles": [
{
"basename": "Docker CLI Commands",
"path": "docker/Docker CLI Commands.md"
},
{
"basename": "Docker",
"path": "docker/Docker.md"
Expand All @@ -8,6 +12,14 @@
"basename": "Docker Container",
"path": "docker/Docker Container.md"
},
{
"basename": "Docker Image",
"path": "docker/Docker Image.md"
},
{
"basename": "docker-image",
"path": "attachments/docker-image.png"
},
{
"basename": "Install Docker on Windows WSL 2",
"path": "docker/Install Docker on Windows WSL 2.md"
Expand Down Expand Up @@ -187,18 +199,6 @@
{
"basename": "PostgreSQL Constraints",
"path": "postgresql/PostgreSQL Constraints.md"
},
{
"basename": "PostgreSQL Primary Key and Foreign Key",
"path": "postgresql/PostgreSQL Primary Key and Foreign Key.md"
},
{
"basename": "PostgreSQL Insert and Import",
"path": "postgresql/PostgreSQL Insert and Import.md"
},
{
"basename": "PostgreSQL Select",
"path": "postgresql/PostgreSQL Select.md"
}
],
"omittedPaths": [],
Expand Down
33 changes: 16 additions & 17 deletions content/.obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,25 @@
"state": {
"type": "markdown",
"state": {
"file": "docker/Docker.md",
"file": "docker/Docker CLI Commands.md",
"mode": "source",
"source": false
}
}
},
{
"id": "51af5d0db36e132f",
"id": "720ac84f203cc18f",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "docker/Docker.md",
"file": "docker/Docker Image.md",
"mode": "source",
"source": false
}
}
}
],
"currentTab": 1
]
}
],
"direction": "vertical"
Expand Down Expand Up @@ -115,7 +114,7 @@
"state": {
"type": "localgraph",
"state": {
"file": "docker/Docker.md",
"file": "docker/Docker CLI Commands.md",
"options": {
"collapse-filter": true,
"search": "",
Expand Down Expand Up @@ -165,7 +164,7 @@
"state": {
"type": "outline",
"state": {
"file": "docker/Docker.md"
"file": "docker/Docker CLI Commands.md"
}
}
},
Expand Down Expand Up @@ -206,7 +205,7 @@
"state": {
"type": "file-properties",
"state": {
"file": "docker/Docker.md"
"file": "docker/Docker CLI Commands.md"
}
}
}
Expand All @@ -215,15 +214,15 @@
{
"id": "664c38c8bd525c44",
"type": "tabs",
"dimension": 19.36108422071636,
"dimension": 39.8838334946757,
"children": [
{
"id": "94751ef195017213",
"type": "leaf",
"state": {
"type": "outgoing-link",
"state": {
"file": "docker/Docker.md",
"file": "docker/Docker CLI Commands.md",
"linksCollapsed": false,
"unlinkedCollapsed": false
}
Expand All @@ -234,15 +233,15 @@
{
"id": "ac5e343256989119",
"type": "tabs",
"dimension": 41.91674733785092,
"dimension": 21.39399806389158,
"children": [
{
"id": "d73c6d045a2bcd47",
"type": "leaf",
"state": {
"type": "backlink",
"state": {
"file": "docker/Docker.md",
"file": "docker/Docker CLI Commands.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
Expand Down Expand Up @@ -272,10 +271,13 @@
"cmdr:Obsidian Git: Create backup": false
}
},
"active": "51af5d0db36e132f",
"active": "94dafe9c731fce38",
"lastOpenFiles": [
"docker/Docker Container.md",
"docker/Docker.md",
"docker/Docker CLI Commands.md",
"docker/Docker Container.md",
"docker/Docker Image.md",
"attachments/docker-image.png",
"docker/Install Docker on Windows WSL 2.md",
"attachments/docker-container.png",
"attachments/how-docker-works.png",
Expand Down Expand Up @@ -309,16 +311,13 @@
"react/Controlled Components.md",
"mocs/Web-Dev MOC.md",
"mocs/Dev Environment MOC.md",
"browser-event/Event CurrentTarget and Target.md",
"attachments/event-capturing-and-bubbling.png",
"attachments/Pasted image 20240524152334.png",
"prettier/Prettier.md",
"prettier",
"postgresql",
"prisma",
"fish-shell",
"attachments/avatar-jay.jpeg",
"attachments/prepositions-of-place.png",
"Untitled.canvas"
]
}
Binary file added content/attachments/docker-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions content/docker/Docker CLI Commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
draft: false
date: 2024-06-12 18:19
tags:
- docker
---

```bash
docker run [image_name]
```

```
docker
```



> [!info] References
> -
5 changes: 4 additions & 1 deletion content/docker/Docker Container.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
draft: false
date: 2024-06-12 16:01
date: 2024-06-12 18:19
tags:
- docker
---
Expand All @@ -12,5 +12,8 @@ A [[Docker]] container is a process or a set of processes with isolated resource
- `namespacing` is an OS feature that segments hardware resources for specific processes. For example, creating separate segments on the hard drive for Python 2 and Python 3, and directing system calls to the appropriate segment based on which application is making the call.
- `cgroups` (Control Groups) limit the amount of resources (CPU, memory, network bandwidth) a process can use.




> [!info] References
> - [Docker and Kubernetes: The Complete Guide](https://www.udemy.com/course/docker-and-kubernetes-the-complete-guide)
16 changes: 16 additions & 0 deletions content/docker/Docker Image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
draft: false
date: 2024-06-12 18:31
tags:
- docker
---

A [[Docker]] Image can be thought of as a ==filesystem snapshot with a startup command==. When a [[Docker Container|container]] is created from an image, [[Docker]] first sets up a layered filesystem for the [[docker container|container]] based on the image.

This filesystem is not loaded entirely into memory but is mounted in a way that the container can access it. [[Docker]] then executes the startup command specified in the image within this filesystem and environment.

![[docker-image.png]]


> [!info] References
> - [Docker and Kubernetes: The Complete Guide](https://www.udemy.com/course/docker-and-kubernetes-the-complete-guide)
6 changes: 3 additions & 3 deletions content/docker/Docker.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
draft: false
date: 2024-06-12 16:00
date: 2024-06-12 18:33
tags:
- docker
---

Docker is an ecosystem comprising the Docker Client (CLI), Docker Daemon (Server), Docker Hub, Docker Images, and Docker Compose, all working together to achieve ==containerization==. Containerization involves encapsulating the necessary steps, dependencies, and configurations for setting up software or executing an application into a single [[Docker Container|container]] instance.
Docker is an ecosystem comprising the [[Docker CLI Commands|Docker Client (CLI)]], Docker Daemon (Server), Docker Hub, [[Docker Image|Docker Images]], and Docker Compose, all working together to achieve ==containerization==. [[Docker Container|Containerization]] involves encapsulating the necessary steps, dependencies, and configurations for setting up software or executing an application into a single [[Docker Container|container]] instance.

![[how-docker-works.png]]

When you run `docker run hello-world` for the first time, the Docker Client asks the Docker Server to run this command. The Docker Server first looks for the `hello-world` image in the **image cache** on your machine. If there's no such image on your machine, it then pulls it from the Docker Hub over the Internet and caches it. Finally, the Docker server takes the image, loads it into memory, creates a [[Docker Container|container]] from it, and runs the program inside it.
When you run `docker run hello-world` for the first time, the Docker Client asks the Docker Server to run this command. The Docker Server first looks for the `hello-world` [[Docker image|image]] in the **image cache** on your machine. If there's no such image on your machine, it then pulls it from the Docker Hub over the Internet and caches it. Finally, the Docker server takes the image, loads it into memory, creates a [[Docker Container|container]] from it, and runs the program inside it.


> [!info] References
Expand Down

0 comments on commit cc35b02

Please sign in to comment.