1"use strict";(self.webpackChunkdevspace_cloud=self.webpackChunkdevspace_cloud||[]).push([[3775],{24476(e,n,r){r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>t,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>a});const o=JSON.parse('{"id":"fragments/build-option-buildArgs","title":"build-option-buildArgs","description":"The buildArgs option expects a map of buildArgs representing values for the --build-arg flag used for docker or kaniko build commands.","source":"@site/versioned_docs/version-5.x/fragments/build-option-buildArgs.mdx","sourceDirName":"fragments","slug":"/fragments/build-option-buildArgs","permalink":"/docs/5.x/fragments/build-option-buildArgs","draft":false,"unlisted":false,"editUrl":"https://github.com/loft-sh/devspace/edit/main/docs/versioned_docs/version-5.x/fragments/build-option-buildArgs.mdx","tags":[],"version":"5.x","lastUpdatedAt":1648012986000,"frontMatter":{}}');var s=r(74848),d=r(28453);const i={},t=void 0,l={},a=[{value:"Example: Defining Build Args for Docker",id:"example-defining-build-args-for-docker",level:4}];function c(e){const n={br:"br",code:"code",h4:"h4",p:"p",pre:"pre",strong:"strong",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"buildArgs"})," option expects a map of buildArgs representing values for the ",(0,s.jsx)(n.code,{children:"--build-arg"})," flag used for ",(0,s.jsx)(n.code,{children:"docker"})," or ",(0,s.jsx)(n.code,{children:"kaniko"})," build commands."]}),"\n",(0,s.jsx)(n.h4,{id:"example-defining-build-args-for-docker",children:"Example: Defining Build Args for Docker"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"images:\n backend:\n image: john/appbackend\n build:\n docker:\n options:\n buildArgs:\n arg1: arg-value-2\n arg2: arg-value-2\n"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Explanation:"}),(0,s.jsx)(n.br,{}),"\n","The image ",(0,s.jsx)(n.code,{children:"backend"})," would be built using ",(0,s.jsx)(n.code,{children:"docker"})," and ",(0,s.jsx)(n.code,{children:"docker build"})," would be called using the ",(0,s.jsx)(n.code,{children:"--build-arg arg1=arg-value-1 --build-arg arg2=arg-value-2"})," flags."]})]})}function u(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453(e,n,r){r.d(n,{R:()=>i,x:()=>t});var o=r(96540);const s={},d=o.createContext(s);function i(e){const n=o.useContext(d);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(d.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.