簡體   English   中英

我可以使用包含 docker 文件的源代碼的 skaffold 構建嗎

[英]Can I use skaffold build with source code that contians docker file

需要克隆一些 repo 說: git clone abc.git 然后將上下文切換到 abc 然后使用 dockerfile 在 abc 中傳遞自定義 ARGS.

是否有可能通過 skaffold 實現這一目標

例如:

- name: test-build
  build:
    tagPolicy:
      envTemplate:
        template: 1.0.0
    artifacts:
    - image: dockerhub.io/test-build
      requires:
        command: ["git", "clone", "abc.git"]
      context: ./abc

這是使用 skaffold 自定義構建對我有用的一種方法

- name: test-build
 build:
    tagPolicy:
      envTemplate:
        template: 1.0.0
    artifacts:
    - image: dockerhub.io/test-build
       custom:
          buildCommand: docker build github.com/abc.git#v1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM