將dockerfile與alpine-minirootfs-3.8.4-x86_64.tar.gz放在同一資料夾下,執行構建命令:
podman build -t alpine .
使用映象執行容器,容器名為alpine001
podman run -itd --name alpine001 localhost/alpine
進入映象執行
podman exec -it alpine001 sh
指令
作用apk
安裝軟體,類似於yum
連按tab鍵兩次
輸出所有可用的命令,都是基礎命令
/ # apk
apk-tools 2.10.1, compiled for x86_64.
installing and removing packages:
add add packages to 'world' and install
(or upgrade) them, while ensuring that all dependencies are met
del remove packages from 'world' and uninstall them
system maintenance:
fix repair package or upgrade it without modifying main dependencies
update update repository indexes from all remote repositories
upgrade upgrade currently installed packages to match repositories
cache download missing packages to cache and/or delete unneeded files from cache
querying information about packages:
info give detailed information about packages or repositories
list list packages by pattern and other criteria
dot generate graphviz graphs
policy show repository policy for packages
repository maintenance:
index create repository index file from files
fetch download packages from global repositories to a local directory
verify verify package integrity and signature
manifest show checksums of package contents
use apk --help for command-specific help.
use apk --help --verbose for a full command listing.
this apk has coffee ****** abilities.
apk源配置檔案為:/etc/apk/repositories要使用apk安裝軟體,需要更新快取,必須先執行建議改為阿里源
apk update
指令
詳解apk list open
列出符合萬用字元表示式的軟體
apk add openjdk8
安裝openjdk8
Docker映象 容器的理解和使用方法
零 應用背景 先看下面2個問題 1.單機多系統。如 windows上跑linux vps服務 pass服務。windows上跑linux,一般用vm技術實現。vps提供商需要將一台機器劃分成多個虛擬機器,提供給使用者,例如將一台8核16g的物理機器劃分成8個1核2g 實際上會比這個少 給8個使用者使...
ruby 迭代器使用方法
ruby 迭代器並不是ruby發明的.它廣泛地運用於各種物件導向語言.在lisp中也有,只是不這麼叫罷了.儘管如此,迭代器的概念並不為許多人熟悉,因此我們將在此做較為詳細的介紹.你知道,動詞 iterate 的意思是做同一件事許多遍,因此,iterator就是用來將同一件事做許多次的東西.當我們寫程...
編譯器使用方法
建立乙個自定義列表 如何建立乙個註腳 注釋也是必不可少的 katex數學公式 新的甘特圖功能,豐富你的文章 uml 圖表 flowchart流程圖 匯出與匯入 你好!這是你第一次使用markdown編輯器所展示的歡迎頁。如果你想學習如何使用markdown編輯器,可以仔細閱讀這篇文章,了解一下mar...