asp.core生成docker鏡像(使用本地nuget)

生成Dockerfile

vs自帶生成Dockerfile功能了
image
image
image

使用本地的nuget包

  1. 加入nuget配置文件NuGet.Config
  2. NuGet.Config配置文件,配置地址
    image
    image
    如果沒有配置生成鏡像會報錯,沒找到package
    image

生成鏡像

image
image
生成Docker映像(想深入瞭解,可以網上看看docker build的參數)
docker build -f "C:\Project\Apollo\Apollo.TaobaoOpenCrm\src\Apollo.TaobaoOpenCrm.Host\Dockerfile" --force-rm -t apollotaobaoopencrmhost --label "com.microsoft.created-by=visual-studio" --label "com.microsoft.visual-studio.project-name=Apollo.TaobaoOpenCrm.Host" "C:\Project\Apollo\Apollo.TaobaoOpenCrm"

生產發佈(jenkins生成鏡像)

生成的Dockerfile一般都是放在,啓動項目裏面的。運維會要求你Dockerfile放在根目錄。
image
image

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章