Tag:cli
All the articles with the tag "cli".
Docker Multi-Stage build 的 intermediate image 留存問題
Docker 17.05 起的 multi-stage build 能讓最終 image 保持乾淨輕量,但被丟棄的中繼 image 沒有標籤、難以存取——本文介紹如何存取與除錯這些中繼層的技巧。
使用 ssh-copy-id 將 ssh public key 存到遠端 ssh server 上
ssh-copy-id 把公鑰安裝到遠端 server 的完整用法:如何指定要複製的特定金鑰(如 ed25519)、連線非預設的 22 port,省去手動編輯遠端 authorized_keys 的麻煩。
MySQL 查詢結果以 JSON 格式輸出
不寫程式也能把 MySQL 查詢結果輸出成 JSON:用 mysql 指令搭配 json_object() 函式,再以 jq 格式化輸出。