main docs

This commit is contained in:
Artur Akmalov
2023-05-21 18:42:04 +05:00
parent bce85fd52d
commit 2fd3066f69
26 changed files with 231 additions and 43 deletions
+8
View File
@@ -0,0 +1,8 @@
{
"label": "Docker",
"position": 4,
"link": {
"type": "generated-index",
"description": "Docker commands docs blog"
}
}
+43
View File
@@ -0,0 +1,43 @@
---
sidebar_position: 2
---
# commands
Тут частые команды
Docker run exec or have entry point use: --entry-point=/bin/bash
```
docker run --rm -it image-name sh
```
Build args
```
docker build . -t myimage --build-arg ARTIFACTORY_USER=$ARTIFACTORY_USER --build-arg ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD
```
Docker run rm exec
```
docker run --rm -it tg_webhook_exporter bash
```
Docker overlay who use (need install jq)
```
docker inspect $(docker ps -qa) | jq -r 'map([.Name, .GraphDriver.Data.MergedDir]) | .[] | "\(.[0])\t\(.[1])"'
```
Docker image size
```
docker ps --format '{{.Names}}\n{{.Image}}:{{.Size}}\n' -s
```
Docker cp
```
docker cp <containerId>:/file/path/within/container /host/path/target
```