Docker image commit

 

- Commit Container thành Image: Lệnh này lưu trạng thái container hiện tại thành một Image mới.
# Cú pháp: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
docker commit my_container my_backup_image:v1

- Save Image thành file .tar: Lưu Image vừa tạo ra file.
docker save -o backup_full.tar my_backup_image:v1 
- Cách khôi phục (Restore): Sử dụng lệnh load để nạp file tar vào Docker (nó sẽ trở thành một Image).
docker load -i backup_full.tar

- Gán Image Tag nếu không có
sudo docker image ls -a
docker tag <image_id> <name>:latest
Đọc thêm..

XCP - Create Local ISO storage

mkdir -p /var/opt/xen/ISO_Store
xe sr-create name-label=LocalISO type=iso device-config:location=/var/opt/xen/ISO_Store device-config:legacy_mode=true content-type=iso
xe sr-scan uuid=UUID

 

https://umhau.github.io/create-local-ISO-repository-on-xcp-ng/

https://thuanbui.me/category/systems-infrastructure/virtualization/

Đọc thêm..

Git create - delete - clear

Create, Commit, Push to remote:

 echo "# Device Configs Linh Trung" > README.md

git add .

git commit -m "Initial commit"

git push -u origin master


Delete multi file:

delete multi file: git rm $(git ls-files --deleted)


Clear version git:

git checkout --orphan temp_branch

git add -A

git commit -am "Purging Old History"

git branch -D master

git branch -m master

OR:

git pull --rebase

git reflog expire --expire=now --all

OR:

git fetch --prune

git prune

git gc


git push -f origin master


Đọc thêm..

Git Add Exam:

Git Add Exam: 

echo "# Device Configs Linh Trung" > README.md

git add .

git commit -m "Initial commit"

git push -u origin master


Create Git local:

git init
git add README.md
git add .
git commit -m "first commit"
git remote add origin https://github.com/userName/repoName.git
git push --force origin master
 
echo "# services" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/databom/services.git
git push -u origin main 
Đọc thêm..

How to solve this problem of "! [rejected] master -> master (fetch first)"

How to solve this problem of "! [rejected] master -> master (fetch first)"
First Do this ...
git fetch origin master
git merge master
Then, do this ...
git fetch origin master:tmp
git rebase tmp
git push origin HEAD:master
git branch -D tmp
Now everything works well.


OR:

git fetch origin master:tmp
git rebase tmp
git push origin HEAD:master
git branch -D tmp
Error: Message 'src refspec master does not match any' when pushing commits in Git
git init
git add .
git commit -m 'message'
git *create remote
git push -u origin master
OR
git checkout -b master
git add .
git commit -m "my commit message"
git push origin master
Đọc thêm..

Aruba config SNMP

6200(config)# snmp-server vrf default
6200(config)# snmp-server vrf mgmt
6200(config)# snmp-server system-contact netadmin@hcmus.edu.vn
6200(config)# snmp-server system-description Aruba-6200-NDH
6200(config)# snmp-server system-location Aruba-6200-NDH
6200(config)# snmp-server community CSLT@hcmus
6200(config-community)# access-level ro

Đọc thêm..