diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000000..e69de29bb2 diff --git a/404.html b/404.html new file mode 100644 index 0000000000..9e96f9601d --- /dev/null +++ b/404.html @@ -0,0 +1,723 @@ + + + + + + + + + + + + + + + + + + + + + ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ +

404 - Not found

+ +
+
+ + +
+ +
+ + + +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/CNAME b/CNAME new file mode 100644 index 0000000000..8bc27dadb7 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +ko.build diff --git a/action/index.html b/action/index.html new file mode 100644 index 0000000000..8d9ff68a5d --- /dev/null +++ b/action/index.html @@ -0,0 +1,15 @@ + + + + + + Redirecting... + + + + + + +Redirecting... + + diff --git a/advanced/faq/index.html b/advanced/faq/index.html new file mode 100644 index 0000000000..3bacd6b7c1 --- /dev/null +++ b/advanced/faq/index.html @@ -0,0 +1,983 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Frequently Asked Questions - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + + + + + +
+
+ + + + + + + +

Frequently Asked Questions

+

How can I set ldflags?

+

Using -ldflags is a common way to embed version info in go binaries (In fact, we do this for ko!). +Unfortunately, because ko wraps go build, it's not possible to use this flag directly; however, you can use the GOFLAGS environment variable instead:

+
GOFLAGS="-ldflags=-X=main.version=1.2.3" ko build .
+
+

Currently, there is a limitation that does not allow to set multiple arguments in ldflags using GOFLAGS. +Using -ldflags multiple times also does not work. +In this use case, it works best to use the builds section in the .ko.yaml file.

+

Why are my images all created in 1970?

+

In order to support reproducible builds, ko doesn't embed timestamps in the images it produces by default.

+

However, ko does respect the SOURCE_DATE_EPOCH environment variable, which will set the container image's timestamp accordingly.

+

Similarly, the KO_DATA_DATE_EPOCH environment variable can be used to set the modtime timestamp of the files in KO_DATA_PATH.

+

For example, you can set the container image's timestamp to the current timestamp by executing:

+
export SOURCE_DATE_EPOCH=$(date +%s)
+
+

or set the timestamp of the files in KO_DATA_PATH to the latest git commit's timestamp with:

+
export KO_DATA_DATE_EPOCH=$(git log -1 --format='%ct')
+
+

Can I build Windows containers?

+

Yes, but support for Windows containers is new, experimental, and tenuous. Be prepared to file bugs. 🐛

+

The default base image does not provide a Windows image. +You can try out building a Windows container image by setting the base image to a Windows base image and building with --platform=windows/amd64 or --platform=all:

+

For example, to build a Windows container image, update your .ko.yaml to set the base image:

+
defaultBaseImage: mcr.microsoft.com/windows/nanoserver:ltsc2022
+
+

And build for windows/amd64.

+
ko build ./ --platform=windows/amd64
+
+

Known issues 🐛

+
    +
  • Symlinks in kodata are ignored when building Windows images; only regular files and directories will be included in the Windows image.
  • +
+

Does ko support autocompletion?

+

Yes! ko completion generates a Bash/Zsh/Fish/PowerShell completion script. +You can get how to load it from help document.

+
ko completion [bash|zsh|fish|powershell] --help
+
+

Or, you can source it directly:

+
source <(ko completion)
+
+

Does ko work with Kustomize?

+

Yes! ko resolve -f - will read and process input from stdin, so you can have ko easily process the output of the kustomize command.

+
kustomize build config | ko resolve -f -
+
+

Does ko integrate with other build and development tools?

+

Oh, you betcha. Here's a partial list:

+ +

Does ko work with OpenShift Internal Registry?

+

Yes! Follow these steps:

+
    +
  1. Connect to your OpenShift installation
  2. +
  3. Expose the OpenShift Internal Registry so you can push to it:
  4. +
  5. Export your token to $HOME/.docker/config.json:
  6. +
+
oc registry login --to=$HOME/.docker/config.json
+
+
    +
  1. Create a namespace where you will push your images, i.e: ko-images
  2. +
  3. Execute this command to set KO_DOCKER_REPO to publish images to the internal registry.
  4. +
+
export KO_DOCKER_REPO=$(oc registry info --public)/ko-images
+
+ + + + + + +
+
+ + +
+ +
+ + + +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/advanced/go-packages/index.html b/advanced/go-packages/index.html new file mode 100644 index 0000000000..9a96f323de --- /dev/null +++ b/advanced/go-packages/index.html @@ -0,0 +1,761 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Go Packages - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Go Packages

+

ko's functionality can be consumed as a library in a Go application.

+

To build an image, use pkg/build, and publish it with pkg/publish.

+ + + + + + +
+
+ + +
+ +
+ + + +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/advanced/limitations/index.html b/advanced/limitations/index.html new file mode 100644 index 0000000000..35dc9508b1 --- /dev/null +++ b/advanced/limitations/index.html @@ -0,0 +1,765 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Limitations - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Limitations

+

ko works best when your application has no dependencies on the underlying image.

+

This means ko is ideal when you don't require cgo, and builds are executed with CGO_ENABLED=0 by default.

+

To install other OS packages, make those available in your configured base image.

+

ko only supports Go applications. +For a similar tool targeting Java applications, try Jib. +For other languages, try apko and melange.

+ + + + + + +
+
+ + +
+ +
+ + + +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/advanced/migrating-from-dockerfile/index.html b/advanced/migrating-from-dockerfile/index.html new file mode 100644 index 0000000000..4fe7b6f1b5 --- /dev/null +++ b/advanced/migrating-from-dockerfile/index.html @@ -0,0 +1,855 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Migrating from Dockerfile - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + Skip to content + + +
+
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Migrating from Dockerfile

+

If your Dockerfile looks like either of the examples in the official tutorial for writing a Dockerfile to containerize a Go application, you can easily migrate to use ko instead.

+

Let's review the best practice multi-stage Dockerfile in that tutorial first:

+
# syntax=docker/dockerfile:1
+
+##
+## Build
+##
+FROM golang:1.16-buster AS build
+
+WORKDIR /app
+
+COPY go.mod ./
+COPY go.sum ./
+RUN go mod download
+
+COPY *.go ./
+
+RUN go build -o /docker-gs-ping
+
+##
+## Deploy
+##
+FROM gcr.io/distroless/base-debian10
+
+WORKDIR /
+
+COPY --from=build /docker-gs-ping /docker-gs-ping
+
+EXPOSE 8080
+
+USER nonroot:nonroot
+
+ENTRYPOINT ["/docker-gs-ping"]
+
+

This Dockerfile:

+
    +
  1. pulls the golang:1.16 image
  2. +
  3. COPYs your local source into the container environment (COPYing go.mod and go.sum first and running go mod download, to cache dependencies in the container environment)
  4. +
  5. RUNs go build on your source, inside the container, to produce an executable
  6. +
  7. COPYs the executable built in the previous step into a new image, on top of a minimal distroless base image.
  8. +
+

The result is a Go application built on a minimal base image, with an optimally cached build sequence.

+

After running docker build on this Dockerfile, don't forget to push that image to the registry so you can deploy it.

+
+

Migrating to ko

+

If your Go source is laid out as described in the tutorial, and you've installed and set up your environment, you can simply run ko build ./ to build and push the container image to your registry.

+

You're done. You can delete your Dockerfile and uninstall docker.

+

ko takes advantage of your local Go build cache without needing to be told to, and it sets the ENTRYPOINT and uses a nonroot distroless base image by default.

+

To build a multi-arch image, simply add --platform=all. +Compare this to the equivalent Docker instructions.

+ + + + + + +
+
+ + +
+ +
+ + + +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/agenda/index.html b/agenda/index.html new file mode 100644 index 0000000000..72dab68413 --- /dev/null +++ b/agenda/index.html @@ -0,0 +1,15 @@ + + + + + + Redirecting... + + + + + + +Redirecting... + + diff --git a/assets/images/favicon.png b/assets/images/favicon.png new file mode 100644 index 0000000000..1cf13b9f9d Binary files /dev/null and b/assets/images/favicon.png differ diff --git a/assets/javascripts/bundle.220ee61c.min.js b/assets/javascripts/bundle.220ee61c.min.js new file mode 100644 index 0000000000..116072a11e --- /dev/null +++ b/assets/javascripts/bundle.220ee61c.min.js @@ -0,0 +1,29 @@ +"use strict";(()=>{var Ci=Object.create;var gr=Object.defineProperty;var Ri=Object.getOwnPropertyDescriptor;var ki=Object.getOwnPropertyNames,Ht=Object.getOwnPropertySymbols,Hi=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable;var rn=(e,t,r)=>t in e?gr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P=(e,t)=>{for(var r in t||(t={}))yr.call(t,r)&&rn(e,r,t[r]);if(Ht)for(var r of Ht(t))nn.call(t,r)&&rn(e,r,t[r]);return e};var on=(e,t)=>{var r={};for(var n in e)yr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ht)for(var n of Ht(e))t.indexOf(n)<0&&nn.call(e,n)&&(r[n]=e[n]);return r};var Pt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Pi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ki(t))!yr.call(e,o)&&o!==r&&gr(e,o,{get:()=>t[o],enumerable:!(n=Ri(t,o))||n.enumerable});return e};var yt=(e,t,r)=>(r=e!=null?Ci(Hi(e)):{},Pi(t||!e||!e.__esModule?gr(r,"default",{value:e,enumerable:!0}):r,e));var sn=Pt((xr,an)=>{(function(e,t){typeof xr=="object"&&typeof an!="undefined"?t():typeof define=="function"&&define.amd?define(t):t()})(xr,function(){"use strict";function e(r){var n=!0,o=!1,i=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function a(O){return!!(O&&O!==document&&O.nodeName!=="HTML"&&O.nodeName!=="BODY"&&"classList"in O&&"contains"in O.classList)}function f(O){var Qe=O.type,De=O.tagName;return!!(De==="INPUT"&&s[Qe]&&!O.readOnly||De==="TEXTAREA"&&!O.readOnly||O.isContentEditable)}function c(O){O.classList.contains("focus-visible")||(O.classList.add("focus-visible"),O.setAttribute("data-focus-visible-added",""))}function u(O){O.hasAttribute("data-focus-visible-added")&&(O.classList.remove("focus-visible"),O.removeAttribute("data-focus-visible-added"))}function p(O){O.metaKey||O.altKey||O.ctrlKey||(a(r.activeElement)&&c(r.activeElement),n=!0)}function m(O){n=!1}function d(O){a(O.target)&&(n||f(O.target))&&c(O.target)}function h(O){a(O.target)&&(O.target.classList.contains("focus-visible")||O.target.hasAttribute("data-focus-visible-added"))&&(o=!0,window.clearTimeout(i),i=window.setTimeout(function(){o=!1},100),u(O.target))}function v(O){document.visibilityState==="hidden"&&(o&&(n=!0),Y())}function Y(){document.addEventListener("mousemove",N),document.addEventListener("mousedown",N),document.addEventListener("mouseup",N),document.addEventListener("pointermove",N),document.addEventListener("pointerdown",N),document.addEventListener("pointerup",N),document.addEventListener("touchmove",N),document.addEventListener("touchstart",N),document.addEventListener("touchend",N)}function B(){document.removeEventListener("mousemove",N),document.removeEventListener("mousedown",N),document.removeEventListener("mouseup",N),document.removeEventListener("pointermove",N),document.removeEventListener("pointerdown",N),document.removeEventListener("pointerup",N),document.removeEventListener("touchmove",N),document.removeEventListener("touchstart",N),document.removeEventListener("touchend",N)}function N(O){O.target.nodeName&&O.target.nodeName.toLowerCase()==="html"||(n=!1,B())}document.addEventListener("keydown",p,!0),document.addEventListener("mousedown",m,!0),document.addEventListener("pointerdown",m,!0),document.addEventListener("touchstart",m,!0),document.addEventListener("visibilitychange",v,!0),Y(),r.addEventListener("focus",d,!0),r.addEventListener("blur",h,!0),r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host?r.host.setAttribute("data-js-focus-visible",""):r.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=e;var t;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(r){t=document.createEvent("CustomEvent"),t.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}typeof document!="undefined"&&e(document)})});var cn=Pt(Er=>{(function(e){var t=function(){try{return!!Symbol.iterator}catch(c){return!1}},r=t(),n=function(c){var u={next:function(){var p=c.shift();return{done:p===void 0,value:p}}};return r&&(u[Symbol.iterator]=function(){return u}),u},o=function(c){return encodeURIComponent(c).replace(/%20/g,"+")},i=function(c){return decodeURIComponent(String(c).replace(/\+/g," "))},s=function(){var c=function(p){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var m=typeof p;if(m!=="undefined")if(m==="string")p!==""&&this._fromString(p);else if(p instanceof c){var d=this;p.forEach(function(B,N){d.append(N,B)})}else if(p!==null&&m==="object")if(Object.prototype.toString.call(p)==="[object Array]")for(var h=0;hd[0]?1:0}),c._entries&&(c._entries={});for(var p=0;p1?i(d[1]):"")}})})(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Er);(function(e){var t=function(){try{var o=new e.URL("b","http://a");return o.pathname="c d",o.href==="http://a/c%20d"&&o.searchParams}catch(i){return!1}},r=function(){var o=e.URL,i=function(f,c){typeof f!="string"&&(f=String(f)),c&&typeof c!="string"&&(c=String(c));var u=document,p;if(c&&(e.location===void 0||c!==e.location.href)){c=c.toLowerCase(),u=document.implementation.createHTMLDocument(""),p=u.createElement("base"),p.href=c,u.head.appendChild(p);try{if(p.href.indexOf(c)!==0)throw new Error(p.href)}catch(O){throw new Error("URL unable to set base "+c+" due to "+O)}}var m=u.createElement("a");m.href=f,p&&(u.body.appendChild(m),m.href=m.href);var d=u.createElement("input");if(d.type="url",d.value=f,m.protocol===":"||!/:/.test(m.href)||!d.checkValidity()&&!c)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:m});var h=new e.URLSearchParams(this.search),v=!0,Y=!0,B=this;["append","delete","set"].forEach(function(O){var Qe=h[O];h[O]=function(){Qe.apply(h,arguments),v&&(Y=!1,B.search=h.toString(),Y=!0)}}),Object.defineProperty(this,"searchParams",{value:h,enumerable:!0});var N=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==N&&(N=this.search,Y&&(v=!1,this.searchParams._fromString(this.search),v=!0))}})},s=i.prototype,a=function(f){Object.defineProperty(s,f,{get:function(){return this._anchorElement[f]},set:function(c){this._anchorElement[f]=c},enumerable:!0})};["hash","host","hostname","port","protocol"].forEach(function(f){a(f)}),Object.defineProperty(s,"search",{get:function(){return this._anchorElement.search},set:function(f){this._anchorElement.search=f,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(s,{toString:{get:function(){var f=this;return function(){return f.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(f){this._anchorElement.href=f,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(f){this._anchorElement.pathname=f},enumerable:!0},origin:{get:function(){var f={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],c=this._anchorElement.port!=f&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(c?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(f){},enumerable:!0},username:{get:function(){return""},set:function(f){},enumerable:!0}}),i.createObjectURL=function(f){return o.createObjectURL.apply(o,arguments)},i.revokeObjectURL=function(f){return o.revokeObjectURL.apply(o,arguments)},e.URL=i};if(t()||r(),e.location!==void 0&&!("origin"in e.location)){var n=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:n,enumerable:!0})}catch(o){setInterval(function(){e.location.origin=n()},100)}}})(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Er)});var qr=Pt((Mt,Nr)=>{/*! + * clipboard.js v2.0.11 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */(function(t,r){typeof Mt=="object"&&typeof Nr=="object"?Nr.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Mt=="object"?Mt.ClipboardJS=r():t.ClipboardJS=r()})(Mt,function(){return function(){var e={686:function(n,o,i){"use strict";i.d(o,{default:function(){return Ai}});var s=i(279),a=i.n(s),f=i(370),c=i.n(f),u=i(817),p=i.n(u);function m(j){try{return document.execCommand(j)}catch(T){return!1}}var d=function(T){var E=p()(T);return m("cut"),E},h=d;function v(j){var T=document.documentElement.getAttribute("dir")==="rtl",E=document.createElement("textarea");E.style.fontSize="12pt",E.style.border="0",E.style.padding="0",E.style.margin="0",E.style.position="absolute",E.style[T?"right":"left"]="-9999px";var H=window.pageYOffset||document.documentElement.scrollTop;return E.style.top="".concat(H,"px"),E.setAttribute("readonly",""),E.value=j,E}var Y=function(T,E){var H=v(T);E.container.appendChild(H);var I=p()(H);return m("copy"),H.remove(),I},B=function(T){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},H="";return typeof T=="string"?H=Y(T,E):T instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(T==null?void 0:T.type)?H=Y(T.value,E):(H=p()(T),m("copy")),H},N=B;function O(j){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(E){return typeof E}:O=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},O(j)}var Qe=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=T.action,H=E===void 0?"copy":E,I=T.container,q=T.target,Me=T.text;if(H!=="copy"&&H!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(q!==void 0)if(q&&O(q)==="object"&&q.nodeType===1){if(H==="copy"&&q.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(H==="cut"&&(q.hasAttribute("readonly")||q.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Me)return N(Me,{container:I});if(q)return H==="cut"?h(q):N(q,{container:I})},De=Qe;function $e(j){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$e=function(E){return typeof E}:$e=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},$e(j)}function Ei(j,T){if(!(j instanceof T))throw new TypeError("Cannot call a class as a function")}function tn(j,T){for(var E=0;E0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof I.action=="function"?I.action:this.defaultAction,this.target=typeof I.target=="function"?I.target:this.defaultTarget,this.text=typeof I.text=="function"?I.text:this.defaultText,this.container=$e(I.container)==="object"?I.container:document.body}},{key:"listenClick",value:function(I){var q=this;this.listener=c()(I,"click",function(Me){return q.onClick(Me)})}},{key:"onClick",value:function(I){var q=I.delegateTarget||I.currentTarget,Me=this.action(q)||"copy",kt=De({action:Me,container:this.container,target:this.target(q),text:this.text(q)});this.emit(kt?"success":"error",{action:Me,text:kt,trigger:q,clearSelection:function(){q&&q.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(I){return vr("action",I)}},{key:"defaultTarget",value:function(I){var q=vr("target",I);if(q)return document.querySelector(q)}},{key:"defaultText",value:function(I){return vr("text",I)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(I){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return N(I,q)}},{key:"cut",value:function(I){return h(I)}},{key:"isSupported",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],q=typeof I=="string"?[I]:I,Me=!!document.queryCommandSupported;return q.forEach(function(kt){Me=Me&&!!document.queryCommandSupported(kt)}),Me}}]),E}(a()),Ai=Li},828:function(n){var o=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}function s(a,f){for(;a&&a.nodeType!==o;){if(typeof a.matches=="function"&&a.matches(f))return a;a=a.parentNode}}n.exports=s},438:function(n,o,i){var s=i(828);function a(u,p,m,d,h){var v=c.apply(this,arguments);return u.addEventListener(m,v,h),{destroy:function(){u.removeEventListener(m,v,h)}}}function f(u,p,m,d,h){return typeof u.addEventListener=="function"?a.apply(null,arguments):typeof m=="function"?a.bind(null,document).apply(null,arguments):(typeof u=="string"&&(u=document.querySelectorAll(u)),Array.prototype.map.call(u,function(v){return a(v,p,m,d,h)}))}function c(u,p,m,d){return function(h){h.delegateTarget=s(h.target,p),h.delegateTarget&&d.call(u,h)}}n.exports=f},879:function(n,o){o.node=function(i){return i!==void 0&&i instanceof HTMLElement&&i.nodeType===1},o.nodeList=function(i){var s=Object.prototype.toString.call(i);return i!==void 0&&(s==="[object NodeList]"||s==="[object HTMLCollection]")&&"length"in i&&(i.length===0||o.node(i[0]))},o.string=function(i){return typeof i=="string"||i instanceof String},o.fn=function(i){var s=Object.prototype.toString.call(i);return s==="[object Function]"}},370:function(n,o,i){var s=i(879),a=i(438);function f(m,d,h){if(!m&&!d&&!h)throw new Error("Missing required arguments");if(!s.string(d))throw new TypeError("Second argument must be a String");if(!s.fn(h))throw new TypeError("Third argument must be a Function");if(s.node(m))return c(m,d,h);if(s.nodeList(m))return u(m,d,h);if(s.string(m))return p(m,d,h);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function c(m,d,h){return m.addEventListener(d,h),{destroy:function(){m.removeEventListener(d,h)}}}function u(m,d,h){return Array.prototype.forEach.call(m,function(v){v.addEventListener(d,h)}),{destroy:function(){Array.prototype.forEach.call(m,function(v){v.removeEventListener(d,h)})}}}function p(m,d,h){return a(document.body,m,d,h)}n.exports=f},817:function(n){function o(i){var s;if(i.nodeName==="SELECT")i.focus(),s=i.value;else if(i.nodeName==="INPUT"||i.nodeName==="TEXTAREA"){var a=i.hasAttribute("readonly");a||i.setAttribute("readonly",""),i.select(),i.setSelectionRange(0,i.value.length),a||i.removeAttribute("readonly"),s=i.value}else{i.hasAttribute("contenteditable")&&i.focus();var f=window.getSelection(),c=document.createRange();c.selectNodeContents(i),f.removeAllRanges(),f.addRange(c),s=f.toString()}return s}n.exports=o},279:function(n){function o(){}o.prototype={on:function(i,s,a){var f=this.e||(this.e={});return(f[i]||(f[i]=[])).push({fn:s,ctx:a}),this},once:function(i,s,a){var f=this;function c(){f.off(i,c),s.apply(a,arguments)}return c._=s,this.on(i,c,a)},emit:function(i){var s=[].slice.call(arguments,1),a=((this.e||(this.e={}))[i]||[]).slice(),f=0,c=a.length;for(f;f{"use strict";/*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + */var rs=/["'&<>]/;Yo.exports=ns;function ns(e){var t=""+e,r=rs.exec(t);if(!r)return t;var n,o="",i=0,s=0;for(i=r.index;i0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function W(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function D(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n1||a(m,d)})})}function a(m,d){try{f(n[m](d))}catch(h){p(i[0][3],h)}}function f(m){m.value instanceof et?Promise.resolve(m.value.v).then(c,u):p(i[0][2],m)}function c(m){a("next",m)}function u(m){a("throw",m)}function p(m,d){m(d),i.shift(),i.length&&a(i[0][0],i[0][1])}}function pn(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ee=="function"?Ee(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(s){return new Promise(function(a,f){s=e[i](s),o(a,f,s.done,s.value)})}}function o(i,s,a,f){Promise.resolve(f).then(function(c){i({value:c,done:a})},s)}}function C(e){return typeof e=="function"}function at(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var It=at(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription: +`+r.map(function(n,o){return o+1+") "+n.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=r}});function Ve(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ie=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,o,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Ee(s),f=a.next();!f.done;f=a.next()){var c=f.value;c.remove(this)}}catch(v){t={error:v}}finally{try{f&&!f.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}else s.remove(this);var u=this.initialTeardown;if(C(u))try{u()}catch(v){i=v instanceof It?v.errors:[v]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var m=Ee(p),d=m.next();!d.done;d=m.next()){var h=d.value;try{ln(h)}catch(v){i=i!=null?i:[],v instanceof It?i=D(D([],W(i)),W(v.errors)):i.push(v)}}}catch(v){n={error:v}}finally{try{d&&!d.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}}if(i)throw new It(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)ln(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Ve(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Ve(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var Sr=Ie.EMPTY;function jt(e){return e instanceof Ie||e&&"closed"in e&&C(e.remove)&&C(e.add)&&C(e.unsubscribe)}function ln(e){C(e)?e():e.unsubscribe()}var Le={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var st={setTimeout:function(e,t){for(var r=[],n=2;n0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,o=this,i=o.hasError,s=o.isStopped,a=o.observers;return i||s?Sr:(this.currentObservers=null,a.push(r),new Ie(function(){n.currentObservers=null,Ve(a,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,s=n.isStopped;o?r.error(i):s&&r.complete()},t.prototype.asObservable=function(){var r=new F;return r.source=this,r},t.create=function(r,n){return new xn(r,n)},t}(F);var xn=function(e){ie(t,e);function t(r,n){var o=e.call(this)||this;return o.destination=r,o.source=n,o}return t.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},t.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:Sr},t}(x);var Et={now:function(){return(Et.delegate||Date).now()},delegate:void 0};var wt=function(e){ie(t,e);function t(r,n,o){r===void 0&&(r=1/0),n===void 0&&(n=1/0),o===void 0&&(o=Et);var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=n,i._timestampProvider=o,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(r){var n=this,o=n.isStopped,i=n._buffer,s=n._infiniteTimeWindow,a=n._timestampProvider,f=n._windowTime;o||(i.push(r),!s&&i.push(a.now()+f)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),o=this,i=o._infiniteTimeWindow,s=o._buffer,a=s.slice(),f=0;f0?e.prototype.requestAsyncId.call(this,r,n,o):(r.actions.push(this),r._scheduled||(r._scheduled=ut.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,n,o){var i;if(o===void 0&&(o=0),o!=null?o>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,o);var s=r.actions;n!=null&&((i=s[s.length-1])===null||i===void 0?void 0:i.id)!==n&&(ut.cancelAnimationFrame(n),r._scheduled=void 0)},t}(Wt);var Sn=function(e){ie(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var o=this.actions,i;r=r||o.shift();do if(i=r.execute(r.state,r.delay))break;while((r=o[0])&&r.id===n&&o.shift());if(this._active=!1,i){for(;(r=o[0])&&r.id===n&&o.shift();)r.unsubscribe();throw i}},t}(Dt);var Oe=new Sn(wn);var M=new F(function(e){return e.complete()});function Vt(e){return e&&C(e.schedule)}function Cr(e){return e[e.length-1]}function Ye(e){return C(Cr(e))?e.pop():void 0}function Te(e){return Vt(Cr(e))?e.pop():void 0}function zt(e,t){return typeof Cr(e)=="number"?e.pop():t}var pt=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function Nt(e){return C(e==null?void 0:e.then)}function qt(e){return C(e[ft])}function Kt(e){return Symbol.asyncIterator&&C(e==null?void 0:e[Symbol.asyncIterator])}function Qt(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function zi(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Yt=zi();function Gt(e){return C(e==null?void 0:e[Yt])}function Bt(e){return un(this,arguments,function(){var r,n,o,i;return $t(this,function(s){switch(s.label){case 0:r=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,et(r.read())];case 3:return n=s.sent(),o=n.value,i=n.done,i?[4,et(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,et(o)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function Jt(e){return C(e==null?void 0:e.getReader)}function U(e){if(e instanceof F)return e;if(e!=null){if(qt(e))return Ni(e);if(pt(e))return qi(e);if(Nt(e))return Ki(e);if(Kt(e))return On(e);if(Gt(e))return Qi(e);if(Jt(e))return Yi(e)}throw Qt(e)}function Ni(e){return new F(function(t){var r=e[ft]();if(C(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function qi(e){return new F(function(t){for(var r=0;r=2;return function(n){return n.pipe(e?A(function(o,i){return e(o,i,n)}):de,ge(1),r?He(t):Dn(function(){return new Zt}))}}function Vn(){for(var e=[],t=0;t=2,!0))}function pe(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new x}:t,n=e.resetOnError,o=n===void 0?!0:n,i=e.resetOnComplete,s=i===void 0?!0:i,a=e.resetOnRefCountZero,f=a===void 0?!0:a;return function(c){var u,p,m,d=0,h=!1,v=!1,Y=function(){p==null||p.unsubscribe(),p=void 0},B=function(){Y(),u=m=void 0,h=v=!1},N=function(){var O=u;B(),O==null||O.unsubscribe()};return y(function(O,Qe){d++,!v&&!h&&Y();var De=m=m!=null?m:r();Qe.add(function(){d--,d===0&&!v&&!h&&(p=$r(N,f))}),De.subscribe(Qe),!u&&d>0&&(u=new rt({next:function($e){return De.next($e)},error:function($e){v=!0,Y(),p=$r(B,o,$e),De.error($e)},complete:function(){h=!0,Y(),p=$r(B,s),De.complete()}}),U(O).subscribe(u))})(c)}}function $r(e,t){for(var r=[],n=2;ne.next(document)),e}function K(e,t=document){return Array.from(t.querySelectorAll(e))}function z(e,t=document){let r=ce(e,t);if(typeof r=="undefined")throw new ReferenceError(`Missing element: expected "${e}" to be present`);return r}function ce(e,t=document){return t.querySelector(e)||void 0}function _e(){return document.activeElement instanceof HTMLElement&&document.activeElement||void 0}function tr(e){return L(b(document.body,"focusin"),b(document.body,"focusout")).pipe(ke(1),l(()=>{let t=_e();return typeof t!="undefined"?e.contains(t):!1}),V(e===_e()),J())}function Xe(e){return{x:e.offsetLeft,y:e.offsetTop}}function Kn(e){return L(b(window,"load"),b(window,"resize")).pipe(Ce(0,Oe),l(()=>Xe(e)),V(Xe(e)))}function rr(e){return{x:e.scrollLeft,y:e.scrollTop}}function dt(e){return L(b(e,"scroll"),b(window,"resize")).pipe(Ce(0,Oe),l(()=>rr(e)),V(rr(e)))}var Yn=function(){if(typeof Map!="undefined")return Map;function e(t,r){var n=-1;return t.some(function(o,i){return o[0]===r?(n=i,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,i=this.__entries__;o0},e.prototype.connect_=function(){!Wr||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),va?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Wr||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=ba.some(function(i){return!!~n.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Gn=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),Jn=typeof WeakMap!="undefined"?new WeakMap:new Yn,Xn=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=ga.getInstance(),n=new La(t,r,this);Jn.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Xn.prototype[e]=function(){var t;return(t=Jn.get(this))[e].apply(t,arguments)}});var Aa=function(){return typeof nr.ResizeObserver!="undefined"?nr.ResizeObserver:Xn}(),Zn=Aa;var eo=new x,Ca=$(()=>k(new Zn(e=>{for(let t of e)eo.next(t)}))).pipe(g(e=>L(ze,k(e)).pipe(R(()=>e.disconnect()))),X(1));function he(e){return{width:e.offsetWidth,height:e.offsetHeight}}function ye(e){return Ca.pipe(S(t=>t.observe(e)),g(t=>eo.pipe(A(({target:r})=>r===e),R(()=>t.unobserve(e)),l(()=>he(e)))),V(he(e)))}function bt(e){return{width:e.scrollWidth,height:e.scrollHeight}}function ar(e){let t=e.parentElement;for(;t&&(e.scrollWidth<=t.scrollWidth&&e.scrollHeight<=t.scrollHeight);)t=(e=t).parentElement;return t?e:void 0}var to=new x,Ra=$(()=>k(new IntersectionObserver(e=>{for(let t of e)to.next(t)},{threshold:0}))).pipe(g(e=>L(ze,k(e)).pipe(R(()=>e.disconnect()))),X(1));function sr(e){return Ra.pipe(S(t=>t.observe(e)),g(t=>to.pipe(A(({target:r})=>r===e),R(()=>t.unobserve(e)),l(({isIntersecting:r})=>r))))}function ro(e,t=16){return dt(e).pipe(l(({y:r})=>{let n=he(e),o=bt(e);return r>=o.height-n.height-t}),J())}var cr={drawer:z("[data-md-toggle=drawer]"),search:z("[data-md-toggle=search]")};function no(e){return cr[e].checked}function Ke(e,t){cr[e].checked!==t&&cr[e].click()}function Ue(e){let t=cr[e];return b(t,"change").pipe(l(()=>t.checked),V(t.checked))}function ka(e,t){switch(e.constructor){case HTMLInputElement:return e.type==="radio"?/^Arrow/.test(t):!0;case HTMLSelectElement:case HTMLTextAreaElement:return!0;default:return e.isContentEditable}}function Ha(){return L(b(window,"compositionstart").pipe(l(()=>!0)),b(window,"compositionend").pipe(l(()=>!1))).pipe(V(!1))}function oo(){let e=b(window,"keydown").pipe(A(t=>!(t.metaKey||t.ctrlKey)),l(t=>({mode:no("search")?"search":"global",type:t.key,claim(){t.preventDefault(),t.stopPropagation()}})),A(({mode:t,type:r})=>{if(t==="global"){let n=_e();if(typeof n!="undefined")return!ka(n,r)}return!0}),pe());return Ha().pipe(g(t=>t?M:e))}function le(){return new URL(location.href)}function ot(e){location.href=e.href}function io(){return new x}function ao(e,t){if(typeof t=="string"||typeof t=="number")e.innerHTML+=t.toString();else if(t instanceof Node)e.appendChild(t);else if(Array.isArray(t))for(let r of t)ao(e,r)}function _(e,t,...r){let n=document.createElement(e);if(t)for(let o of Object.keys(t))typeof t[o]!="undefined"&&(typeof t[o]!="boolean"?n.setAttribute(o,t[o]):n.setAttribute(o,""));for(let o of r)ao(n,o);return n}function fr(e){if(e>999){let t=+((e-950)%1e3>99);return`${((e+1e-6)/1e3).toFixed(t)}k`}else return e.toString()}function so(){return location.hash.substring(1)}function Dr(e){let t=_("a",{href:e});t.addEventListener("click",r=>r.stopPropagation()),t.click()}function Pa(e){return L(b(window,"hashchange"),e).pipe(l(so),V(so()),A(t=>t.length>0),X(1))}function co(e){return Pa(e).pipe(l(t=>ce(`[id="${t}"]`)),A(t=>typeof t!="undefined"))}function Vr(e){let t=matchMedia(e);return er(r=>t.addListener(()=>r(t.matches))).pipe(V(t.matches))}function fo(){let e=matchMedia("print");return L(b(window,"beforeprint").pipe(l(()=>!0)),b(window,"afterprint").pipe(l(()=>!1))).pipe(V(e.matches))}function zr(e,t){return e.pipe(g(r=>r?t():M))}function ur(e,t={credentials:"same-origin"}){return ue(fetch(`${e}`,t)).pipe(fe(()=>M),g(r=>r.status!==200?Ot(()=>new Error(r.statusText)):k(r)))}function We(e,t){return ur(e,t).pipe(g(r=>r.json()),X(1))}function uo(e,t){let r=new DOMParser;return ur(e,t).pipe(g(n=>n.text()),l(n=>r.parseFromString(n,"text/xml")),X(1))}function pr(e){let t=_("script",{src:e});return $(()=>(document.head.appendChild(t),L(b(t,"load"),b(t,"error").pipe(g(()=>Ot(()=>new ReferenceError(`Invalid script: ${e}`))))).pipe(l(()=>{}),R(()=>document.head.removeChild(t)),ge(1))))}function po(){return{x:Math.max(0,scrollX),y:Math.max(0,scrollY)}}function lo(){return L(b(window,"scroll",{passive:!0}),b(window,"resize",{passive:!0})).pipe(l(po),V(po()))}function mo(){return{width:innerWidth,height:innerHeight}}function ho(){return b(window,"resize",{passive:!0}).pipe(l(mo),V(mo()))}function bo(){return G([lo(),ho()]).pipe(l(([e,t])=>({offset:e,size:t})),X(1))}function lr(e,{viewport$:t,header$:r}){let n=t.pipe(ee("size")),o=G([n,r]).pipe(l(()=>Xe(e)));return G([r,t,o]).pipe(l(([{height:i},{offset:s,size:a},{x:f,y:c}])=>({offset:{x:s.x-f,y:s.y-c+i},size:a})))}(()=>{function e(n,o){parent.postMessage(n,o||"*")}function t(...n){return n.reduce((o,i)=>o.then(()=>new Promise(s=>{let a=document.createElement("script");a.src=i,a.onload=s,document.body.appendChild(a)})),Promise.resolve())}var r=class extends EventTarget{constructor(n){super(),this.url=n,this.m=i=>{i.source===this.w&&(this.dispatchEvent(new MessageEvent("message",{data:i.data})),this.onmessage&&this.onmessage(i))},this.e=(i,s,a,f,c)=>{if(s===`${this.url}`){let u=new ErrorEvent("error",{message:i,filename:s,lineno:a,colno:f,error:c});this.dispatchEvent(u),this.onerror&&this.onerror(u)}};let o=document.createElement("iframe");o.hidden=!0,document.body.appendChild(this.iframe=o),this.w.document.open(),this.w.document.write(` + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Community

+

Meetings

+

We have a bi-weekly community meeting on Wednesdays at 1:00 AM US Eastern time, 10:00 AM US Western time. The main goal of these meetings is that we want to hear from you! We want to know what you're using ko for, what you'd like to see in ko, how we can make ko better for you. With any remaining time we can go through open issues and PRs.

+

We have a meeting agenda you can use to propose topics for discussion/ideas. You can also just show up and we'll figure out what to talk about.

+

Slack

+

Come discuss ko with us in the #ko-build channel on the Kubernetes Slack! +See you there!

+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/configuration/index.html b/configuration/index.html new file mode 100644 index 0000000000..a179322302 --- /dev/null +++ b/configuration/index.html @@ -0,0 +1,1037 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Configuration - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+ +
+ + + +
+
+ + + + + + + +

Configuration

+

Basic Configuration

+

Aside from certain environment variables (see below) like KO_DOCKER_REPO, you can +configure ko's behavior using a .ko.yaml file. The location of this file can be overridden with KO_CONFIG_PATH.

+

Overriding Base Images

+

By default, ko bases images on cgr.dev/chainguard/static. This is a +small image that provides the bare necessities to run your Go binary.

+

You can override this base image in two ways:

+
    +
  1. To override the base image for all images ko builds, add this line to your + .ko.yaml file:
  2. +
+
defaultBaseImage: registry.example.com/base/image
+
+

You can also use the KO_DEFAULTBASEIMAGE environment variable to set the default base image, which overrides the YAML configuration:

+
KO_DEFAULTBASEIMAGE=registry.example.com/base/image ko build .
+
+
    +
  1. To override the base image for certain importpaths:
  2. +
+
baseImageOverrides:
+  github.com/my-user/my-repo/cmd/app: registry.example.com/base/for/app
+  github.com/my-user/my-repo/cmd/foo: registry.example.com/base/for/foo
+
+

Overriding Go build settings

+

By default, ko builds the binary with no additional build flags other than +-trimpath. You can replace the default build +arguments by providing build flags and ldflags using a +GoReleaser influenced builds +configuration section in your .ko.yaml.

+
builds:
+- id: foo
+  dir: .  # default is .
+  main: ./foobar/foo
+  env:
+  - GOPRIVATE=git.internal.example.com,source.developers.google.com
+  flags:
+  - -tags
+  - netgo
+  ldflags:
+  - -s -w
+  - -extldflags "-static"
+  - -X main.version={{.Env.VERSION}}
+- id: bar
+  dir: ./bar
+  main: .  # default is .
+  env:
+  - GOCACHE=/workspace/.gocache
+  ldflags:
+  - -s
+  - -w
+
+

If your repository contains multiple modules (multiple go.mod files in +different directories), use the dir field to specify the directory where +ko should run go build.

+

ko picks the entry from builds based on the import path you request. The +import path is matched against the result of joining dir and main.

+

The paths specified in dir and main are relative to the working directory +of the ko process.

+

The ldflags default value is [].

+
+

💡 Note: Even though the configuration section is similar to the +GoReleaser builds section, +only the env, flags and ldflags fields are currently supported. Also, the +templating support is currently limited to using environment variables only.

+
+

Setting default platforms

+

By default, ko builds images based on the platform it runs on. If your target platform differs from your build platform you can specify the build platform:

+

As a parameter +See Multi-Platform Images.

+

In .ko.yaml +Add this to your .ko.yaml file:

+
defaultPlatforms:
+- linux/arm64
+- linux/amd64
+
+

You can also use the KO_DEFAULTPLATFORMS environment variable to set the default platforms, which overrides the YAML configuration:

+
KO_DEFAULTPLATFORMS=linux/arm64,linux/amd64
+
+

Environment Variables (advanced)

+

For ease of use, backward compatibility and advanced use cases, ko supports the following environment variables to +influence the build process.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableDefault ValueDescription
KO_DOCKER_REPO(not set)Container repository where to push images built with ko (required)
KO_GO_PATHgogo binary to use for builds, relative or absolute path, otherwise looked up via $PATH (optional)
KO_CONFIG_PATH./ko.yamlPath to ko configuration file (optional)
KOCACHE(not set)This tells ko to store a local mapping between the go build inputs to the image layer that they produce, so go build can be skipped entirely if the layer is already present in the image registry (optional).
+

Naming Images

+

ko provides a few different strategies for naming the image it pushes, to +workaround certain registry limitations and user preferences:

+

Given KO_DOCKER_REPO=registry.example.com/repo, by default, +ko build ./cmd/app will produce an image named like +registry.example.com/repo/app-<md5>, which includes the MD5 hash of the full +import path, to avoid collisions.

+
    +
  • --preserve-import-path (-P) will include the entire importpath: + registry.example.com/repo/github.com/my-user/my-repo/cmd/app
  • +
  • --base-import-paths (-B) will omit the MD5 portion: + registry.example.com/repo/app
  • +
  • --bare will only include the KO_DOCKER_REPO: registry.example.com/repo
  • +
+

Local Publishing Options

+

ko is normally used to publish images to container image registries, +identified by KO_DOCKER_REPO.

+

ko can also load images to a local Docker daemon, if available, by setting +KO_DOCKER_REPO=ko.local, or by passing the --local (-L) flag.

+

Local images can be used as a base image for other ko images:

+
defaultBaseImage: ko.local/example/base/image
+
+

ko can also load images into a local KinD +cluster, if available, by setting KO_DOCKER_REPO=kind.local. By default this +loads into the default KinD cluster name (kind). To load into another KinD +cluster, set KIND_CLUSTER_NAME=my-other-cluster.

+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/custom/main.html b/custom/main.html new file mode 100644 index 0000000000..e87d8ddd2a --- /dev/null +++ b/custom/main.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block site_meta %} + {{ super() }} + {% if page and page.meta and page.meta.ko_meta %} + + + + {% endif %} +{% endblock %} + diff --git a/custom/partials/copyright.html b/custom/partials/copyright.html new file mode 100644 index 0000000000..49dee960f3 --- /dev/null +++ b/custom/partials/copyright.html @@ -0,0 +1 @@ +The Linux Foundation® (TLF) has registered trademarks and uses trademarks. For a list of TLF trademarks, see Trademark Usage diff --git a/deployment/index.html b/deployment/index.html new file mode 100644 index 0000000000..9830c59ca3 --- /dev/null +++ b/deployment/index.html @@ -0,0 +1,900 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Deployment - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Deployment

+

See Kubernetes Integration for information about deploying to Kubernetes.

+

Because the output of ko build is an image reference, you can easily pass it to other tools that expect to take an image reference.

+

docker run

+

To run the container locally:

+
docker run -p 8080:8080 $(ko build ./cmd/app)
+
+
+

Google Cloud Run

+
gcloud run deploy --image=$(ko build ./cmd/app)
+
+
+

💡 Note: The image must be pushed to Google Container Registry or Artifact Registry.

+
+
+

fly.io

+
flyctl launch --image=$(ko build ./cmd/app)
+
+
+

💡 Note: The image must be publicly available.

+
+
+

AWS Lambda

+
aws lambda update-function-code \
+  --function-name=my-function-name \
+  --image-uri=$(ko build ./cmd/app)
+
+
+

💡 Note: The image must be pushed to ECR, based on the AWS provided base image, and use the aws-lambda-go framework. +See official docs for more information.

+
+
+

Azure Container Apps

+
az containerapp update \
+  --name my-container-app
+  --resource-group my-resource-group
+  --image $(ko build ./cmd/app)
+
+
+

💡 Note: The image must be pushed to ACR or other registry service. +See official docs for more information.

+
+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/features/build-cache/index.html b/features/build-cache/index.html new file mode 100644 index 0000000000..3e56553dd5 --- /dev/null +++ b/features/build-cache/index.html @@ -0,0 +1,763 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Build Cache - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Build Cache

+

Because ko just runs go build in your normal development environment, it automatically reuses your go build cache from previous builds, making iterative development faster.

+

ko also avoids pushing blobs to the remote image registry if they're already present, making pushes faster.

+

You can make ko even faster by setting the KOCACHE environment variable. +This tells ko to store a local mapping between the go build inputs to the image layer that they produce, so go build can be skipped entirely if the layer is already present in the image registry.

+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/features/k8s/index.html b/features/k8s/index.html new file mode 100644 index 0000000000..5c03f7e26c --- /dev/null +++ b/features/k8s/index.html @@ -0,0 +1,914 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Kubernetes Integration - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Kubernetes Integration

+

You could stop at just building and pushing images.

+

But, because building images is so easy with ko, and because building with +ko only requires a string importpath to identify the image, we can integrate +this with YAML generation to make Kubernetes use cases much simpler.

+

YAML Changes

+

Traditionally, you might have a Kubernetes deployment, defined in a YAML file, +that runs an image:

+
apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: my-deployment
+spec:
+  replicas: 3
+  ...
+  template:
+    spec:
+      containers:
+      - name: my-app
+        image: registry.example.com/my-app:v1.2.3
+
+

...which you apply to your cluster with kubectl apply:

+
kubectl apply -f deployment.yaml
+
+

With ko, you can instead reference your Go binary by its importpath, prefixed +with ko://:

+
    ...
+    spec:
+      containers:
+      - name: my-app
+        image: ko://github.com/my-user/my-repo/cmd/app
+
+

ko resolve

+

With this small change, running ko resolve -f deployment.yaml will instruct +ko to:

+
    +
  1. scan the YAML file(s) for values with the ko:// prefix,
  2. +
  3. for each unique ko://-prefixed string, execute ko build <importpath> to + build and push an image,
  4. +
  5. replace ko://-prefixed string(s) in the input YAML with the fully-specified + image reference of the built image(s), as above.
  6. +
  7. Print the resulting resolved YAML to stdout.
  8. +
+

The result can be redirected to a file, to distribute to others:

+
ko resolve -f config/ > release.yaml
+
+

Taken together, ko resolve aims to make packaging, pushing, and referencing +container images an invisible implementation detail of your Kubernetes +deployment, and let you focus on writing code in Go.

+

ko apply

+

To apply the resulting resolved YAML config, you can redirect the output of +ko resolve to kubectl apply:

+
ko resolve -f config/ | kubectl apply -f -
+
+

Since this is a relatively common use case, the same functionality is available +using ko apply:

+
ko apply -f config/
+
+

Also, any flags passed after -- are passed to kubectl apply directly, for example to specify context and kubeconfig:

+
ko apply -f config -- --context=foo --kubeconfig=cfg.yaml
+
+

NB: This requires that kubectl is available.

+

ko delete

+

To teardown resources applied using ko apply, you can run ko delete:

+
ko delete -f config/
+
+

This is purely a convenient alias for kubectl delete, and doesn't perform any +builds, or delete any previously built images.

+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/features/multi-platform/index.html b/features/multi-platform/index.html new file mode 100644 index 0000000000..260dfd67ad --- /dev/null +++ b/features/multi-platform/index.html @@ -0,0 +1,765 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Multi-Platform Images - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Multi-Platform Images

+

Because Go supports cross-compilation to other CPU architectures and operating systems, ko excels at producing multi-platform images.

+

To build and push an image for all platforms supported by the configured base image, simply add --platform=all. +This will instruct ko to look up all the supported platforms in the base image, execute GOOS=<os> GOARCH=<arch> GOARM=<variant> go build for each platform, and produce a manifest list containing an image for each platform.

+

You can also select specific platforms, for example, --platform=linux/amd64,linux/arm64.

+

ko also has experimental support for building for Windows images. +See FAQ.

+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/features/sboms/index.html b/features/sboms/index.html new file mode 100644 index 0000000000..ec5665734f --- /dev/null +++ b/features/sboms/index.html @@ -0,0 +1,764 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + SBOMs - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

SBOMs

+

A Software Bill of Materials (SBOM) is a list of software components that a software artifact depends on. +Having a list of dependencies can be helpful in determining whether any vulnerable components were used to build the software artifact.

+

From v0.9+, ko generates and uploads an SBOM for every image it produces by default.

+

ko will generate an SBOM in the SPDX format by default, but you can select the CycloneDX format instead with the --sbom=cyclonedx flag. To disable SBOM generation, pass --sbom=none.

+

These SBOMs can be downloaded using the cosign download sbom command.

+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/features/static-assets/index.html b/features/static-assets/index.html new file mode 100644 index 0000000000..8d70fde862 --- /dev/null +++ b/features/static-assets/index.html @@ -0,0 +1,788 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Static Assets - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Static Assets

+

ko can also bundle static assets into the images it produces.

+

By convention, any contents of a directory named <importpath>/kodata/ will be +bundled into the image, and the path where it's available in the image will be +identified by the environment variable KO_DATA_PATH.

+

As an example, you can bundle and serve static contents in your image:

+
cmd/
+  app/
+    main.go
+    kodata/
+      favicon.ico
+      index.html
+
+

Then, in your main.go:

+
func main() {
+    http.Handle("/", http.FileServer(http.Dir(os.Getenv("KO_DATA_PATH"))))
+    log.Fatal(http.ListenAndServe(":8080", nil))
+}
+
+

You can simulate ko's behavior outside of the container image by setting the +KO_DATA_PATH environment variable yourself with KO_DATA_PATH=cmd/app/kodata/ go run ./cmd/app.

+
+

💡 Tip: Symlinks in kodata are followed and included as well. For example, +you can include Git commit information in your image with ln -s -r .git/HEAD ./cmd/app/kodata/

+
+

Also note that http.FileServer will not serve the Last-Modified header +(or validate If-Modified-Since request headers) because ko does not embed +timestamps by default.

+

This can be supported by manually setting the KO_DATA_DATE_EPOCH environment +variable during build (See FAQ).

+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/get-started/index.html b/get-started/index.html new file mode 100644 index 0000000000..b8ea5f812a --- /dev/null +++ b/get-started/index.html @@ -0,0 +1,888 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Get Started - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Get Started

+

Setup

+

First, install ko.

+

Authenticate

+

ko depends on the authentication configured in your Docker config (typically ~/.docker/config.json).

+

If you can push an image with docker push, you are already authenticated for ko!

+

Since ko doesn't require docker, ko login also provides a surface for logging in to a container image registry with a username and password, similar to docker login.

+

Additionally, even if auth is not configured in the Docker config, ko includes built-in support for authenticating to the following container registries using credentials configured in the environment:

+ +

Choose Destination

+

ko depends on an environment variable, KO_DOCKER_REPO, to identify where it should push images that it builds. Typically this will be a remote registry, e.g.:

+
    +
  • KO_DOCKER_REPO=gcr.io/my-project, or
  • +
  • KO_DOCKER_REPO=ghcr.io/my-org/my-repo, or
  • +
  • KO_DOCKER_REPO=my-dockerhub-user
  • +
+

Build an Image

+

ko build ./cmd/app builds and pushes a container image, and prints the resulting image digest to stdout.

+

In this example, ./cmd/app must be a package main that defines func main().

+
$ ko build ./cmd/app
+...
+registry.example.com/my-project/app-099ba5bcefdead87f92606265fb99ac0@sha256:6e398316742b7aa4a93161dce4a23bc5c545700b862b43347b941000b112ec3e
+
+
+

💡 Note: Prior to v0.10, the command was called ko publish -- this is equivalent to ko build, and both commands will work and do the same thing.

+
+

The executable binary that was built from ./cmd/app is available in the image at /ko-app/app -- the binary name matches the base import path name -- and that binary is the image's entrypoint.

+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/godoc/index.html b/godoc/index.html new file mode 100644 index 0000000000..ea0a09a0c9 --- /dev/null +++ b/godoc/index.html @@ -0,0 +1,15 @@ + + + + + + Redirecting... + + + + + + +Redirecting... + + diff --git a/images/android-icon-192x192.png b/images/android-icon-192x192.png new file mode 100644 index 0000000000..61937465a7 Binary files /dev/null and b/images/android-icon-192x192.png differ diff --git a/images/apple-icon-180x180.png b/images/apple-icon-180x180.png new file mode 100644 index 0000000000..401bee6808 Binary files /dev/null and b/images/apple-icon-180x180.png differ diff --git a/images/apple-icon.png b/images/apple-icon.png new file mode 100644 index 0000000000..3bb8b0ce08 Binary files /dev/null and b/images/apple-icon.png differ diff --git a/images/cncf.svg b/images/cncf.svg new file mode 100644 index 0000000000..c8d667f370 --- /dev/null +++ b/images/cncf.svg @@ -0,0 +1 @@ +cncf-color-bg.svg \ No newline at end of file diff --git a/images/demo.png b/images/demo.png new file mode 100644 index 0000000000..58e4fa2e26 Binary files /dev/null and b/images/demo.png differ diff --git a/images/favicon-16x16.png b/images/favicon-16x16.png new file mode 100644 index 0000000000..7ce269a635 Binary files /dev/null and b/images/favicon-16x16.png differ diff --git a/images/favicon-32x32.png b/images/favicon-32x32.png new file mode 100644 index 0000000000..363041f251 Binary files /dev/null and b/images/favicon-32x32.png differ diff --git a/images/favicon-96x96.png b/images/favicon-96x96.png new file mode 100644 index 0000000000..3f17bb3eba Binary files /dev/null and b/images/favicon-96x96.png differ diff --git a/images/ko-with-name.svg b/images/ko-with-name.svg new file mode 100644 index 0000000000..8fb64f7bd5 --- /dev/null +++ b/images/ko-with-name.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/ko.png b/images/ko.png new file mode 100644 index 0000000000..ed9142d205 Binary files /dev/null and b/images/ko.png differ diff --git a/images/ko.svg b/images/ko.svg new file mode 100644 index 0000000000..945ba614bb --- /dev/null +++ b/images/ko.svg @@ -0,0 +1,714 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/ms-icon-144x144.png b/images/ms-icon-144x144.png new file mode 100644 index 0000000000..ff00f42b8d Binary files /dev/null and b/images/ms-icon-144x144.png differ diff --git a/images/og.png b/images/og.png new file mode 100644 index 0000000000..1ed77c166e Binary files /dev/null and b/images/og.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000000..9d3452f9af --- /dev/null +++ b/index.html @@ -0,0 +1,784 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

Introduction

+

ko makes building Go container images easy, fast, and secure by default.

+

Demo of ko build

+

ko is a simple, fast container image builder for Go applications.

+

It's ideal for use cases where your image contains a single Go application without many dependencies on the OS base image (e.g., no cgo, no OS package dependencies).

+

ko builds images by executing go build on your local machine, and as such doesn't require docker to be installed. +This can make it a good fit for lightweight CI/CD use cases.

+

ko makes multi-platform builds easy, produces SBOMs by default, and includes support for simple YAML templating which makes it a powerful tool for Kubernetes applications.

+
+
+

🏃 Install ko and get started!

+
+
+

ko is used and loved by these open source projects:

+ +

Add your project here!

+
+

ko is a Cloud Native Computing Foundation Sandbox project.

+

CNCF logo

+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/install/index.html b/install/index.html new file mode 100644 index 0000000000..e78dedc513 --- /dev/null +++ b/install/index.html @@ -0,0 +1,891 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Installation - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+ +
+
+ + + +
+
+ + + + + + + +

Installation

+

Install from GitHub Releases

+
$ VERSION=TODO # choose the latest version (without v prefix)
+$ OS=Linux     # or Darwin
+$ ARCH=x86_64  # or arm64, i386, s390x
+
+

We generate SLSA3 provenance using the OpenSSF's slsa-framework/slsa-github-generator. To verify our release, install the verification tool from slsa-framework/slsa-verifier#installation and verify as follows:

+
$ curl -sSfL "https://github.com/ko-build/ko/releases/download/v${VERSION}/ko_${VERSION}_${OS}_${ARCH}.tar.gz" > ko.tar.gz
+$ curl -sSfL https://github.com/ko-build/ko/releases/download/v${VERSION}/attestation.intoto.jsonl > provenance.intoto.jsonl
+$ slsa-verifier -artifact-path ko.tar.gz -provenance provenance.intoto.jsonl -source github.com/google/ko -tag "v${VERSION}"
+  PASSED: Verified SLSA provenance
+
+
$ tar xzf ko.tar.gz ko
+$ chmod +x ./ko
+
+

Install using Homebrew

+
brew install ko
+
+

Install on Alpine Linux

+

Installation on Alpine requires using the testing repository

+
echo https://dl-cdn.alpinelinux.org/alpine/edge/testing/ >> /etc/apk/repositories
+apk update
+apk add ko
+
+

Build and Install from source

+

With Go 1.16+, build and install the latest released version:

+
go install github.com/google/ko@latest
+
+

Setup on GitHub Actions

+

You can use the setup-ko action to install ko and setup auth to GitHub Container Registry in a GitHub Action workflow:

+
steps:
+- uses: imjasonh/setup-ko@v0.6
+
+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/issues/index.html b/issues/index.html new file mode 100644 index 0000000000..72a7028a7b --- /dev/null +++ b/issues/index.html @@ -0,0 +1,15 @@ + + + + + + Redirecting... + + + + + + +Redirecting... + + diff --git a/prs/index.html b/prs/index.html new file mode 100644 index 0000000000..fafee4b418 --- /dev/null +++ b/prs/index.html @@ -0,0 +1,15 @@ + + + + + + Redirecting... + + + + + + +Redirecting... + + diff --git a/reference/ko/index.html b/reference/ko/index.html new file mode 100644 index 0000000000..637c469934 --- /dev/null +++ b/reference/ko/index.html @@ -0,0 +1,859 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ko - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

ko

+ +

ko

+

Rapidly iterate with Go, Containers, and Kubernetes.

+
ko [flags]
+
+

Options

+
  -h, --help      help for ko
+  -v, --verbose   Enable debug logs
+
+

SEE ALSO

+
    +
  • ko apply - Apply the input files with image references resolved to built/pushed image digests.
  • +
  • ko build - Build and publish container images from the given importpaths.
  • +
  • ko create - Create the input files with image references resolved to built/pushed image digests.
  • +
  • ko delete - See "kubectl help delete" for detailed usage.
  • +
  • ko login - Log in to a registry
  • +
  • ko resolve - Print the input files with image references resolved to built/pushed image digests.
  • +
  • ko run - A variant of kubectl run that containerizes IMPORTPATH first.
  • +
  • ko version - Print ko version.
  • +
+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/reference/ko_apply/index.html b/reference/ko_apply/index.html new file mode 100644 index 0000000000..16fa4013a8 --- /dev/null +++ b/reference/ko_apply/index.html @@ -0,0 +1,947 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ko apply - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

ko apply

+ +

ko apply

+

Apply the input files with image references resolved to built/pushed image digests.

+

Synopsis

+

This sub-command finds import path references within the provided files, builds them into Go binaries, containerizes them, publishes them, and then feeds the resulting yaml into "kubectl apply".

+
ko apply -f FILENAME [flags]
+
+

Examples

+

+  # Build and publish import path references to a Docker
+  # Registry as:
+  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>
+  # Then, feed the resulting yaml into "kubectl apply".
+  # When KO_DOCKER_REPO is ko.local, it is the same as if
+  # --local was passed.
+  ko apply -f config/
+
+  # Build and publish import path references to a Docker
+  # Registry preserving import path names as:
+  #   ${KO_DOCKER_REPO}/<import path>
+  # Then, feed the resulting yaml into "kubectl apply".
+  ko apply --preserve-import-paths -f config/
+
+  # Build and publish import path references to a Docker
+  # daemon as:
+  #   ko.local/<import path>
+  # Then, feed the resulting yaml into "kubectl apply".
+  ko apply --local -f config/
+
+  # Apply from stdin:
+  cat config.yaml | ko apply -f -
+
+  # Any flags passed after '--' are passed to 'kubectl apply' directly:
+  ko apply -f config -- --namespace=foo --kubeconfig=cfg.yaml
+
+
+

Options

+
      --bare                     Whether to just use KO_DOCKER_REPO without additional context (may not work properly with --tags).
+  -B, --base-import-paths        Whether to use the base path without MD5 hash after KO_DOCKER_REPO (may not work properly with --tags).
+      --disable-optimizations    Disable optimizations when building Go code. Useful when you want to interactively debug the created container.
+  -f, --filename strings         Filename, directory, or URL to files to use to create the resource
+  -h, --help                     help for apply
+      --image-label strings      Which labels (key=value) to add to the image.
+      --image-refs string        Path to file where a list of the published image references will be written.
+      --insecure-registry        Whether to skip TLS verification on the registry
+  -j, --jobs int                 The maximum number of concurrent builds (default GOMAXPROCS)
+  -L, --local                    Load into images to local docker daemon.
+      --oci-layout-path string   Path to save the OCI image layout of the built images
+      --platform strings         Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*
+  -P, --preserve-import-paths    Whether to preserve the full import path after KO_DOCKER_REPO.
+      --push                     Push images to KO_DOCKER_REPO (default true)
+  -R, --recursive                Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
+      --sbom string              The SBOM media type to use (none will disable SBOM synthesis and upload, also supports: spdx, cyclonedx, go.version-m). (default "spdx")
+      --sbom-dir string          Path to file where the SBOM will be written.
+  -l, --selector string          Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
+      --tag-only                 Include tags but not digests in resolved image references. Useful when digests are not preserved when images are repopulated.
+  -t, --tags strings             Which tags to use for the produced image instead of the default 'latest' tag (may not work properly with --base-import-paths or --bare). (default [latest])
+      --tarball string           File to save images tarballs
+
+

Options inherited from parent commands

+
  -v, --verbose   Enable debug logs
+
+

SEE ALSO

+
    +
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
  • +
+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/reference/ko_build/index.html b/reference/ko_build/index.html new file mode 100644 index 0000000000..076dea0f43 --- /dev/null +++ b/reference/ko_build/index.html @@ -0,0 +1,941 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ko build - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

ko build

+ +

ko build

+

Build and publish container images from the given importpaths.

+

Synopsis

+

This sub-command builds the provided import paths into Go binaries, containerizes them, and publishes them.

+
ko build IMPORTPATH... [flags]
+
+

Examples

+

+  # Build and publish import path references to a Docker Registry as:
+  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>
+  # When KO_DOCKER_REPO is ko.local, it is the same as if --local and
+  # --preserve-import-paths were passed.
+  # If the import path is not provided, the current working directory is the
+  # default.
+  ko build github.com/foo/bar/cmd/baz github.com/foo/bar/cmd/blah
+
+  # Build and publish a relative import path as:
+  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>
+  # When KO_DOCKER_REPO is ko.local, it is the same as if --local and
+  # --preserve-import-paths were passed.
+  ko build ./cmd/blah
+
+  # Build and publish a relative import path as:
+  #   ${KO_DOCKER_REPO}/<import path>
+  # When KO_DOCKER_REPO is ko.local, it is the same as if --local was passed.
+  ko build --preserve-import-paths ./cmd/blah
+
+  # Build and publish import path references to a Docker daemon as:
+  #   ko.local/<import path>
+  # This always preserves import paths.
+  ko build --local github.com/foo/bar/cmd/baz github.com/foo/bar/cmd/blah
+
+

Options

+
      --bare                     Whether to just use KO_DOCKER_REPO without additional context (may not work properly with --tags).
+  -B, --base-import-paths        Whether to use the base path without MD5 hash after KO_DOCKER_REPO (may not work properly with --tags).
+      --disable-optimizations    Disable optimizations when building Go code. Useful when you want to interactively debug the created container.
+  -h, --help                     help for build
+      --image-label strings      Which labels (key=value) to add to the image.
+      --image-refs string        Path to file where a list of the published image references will be written.
+      --insecure-registry        Whether to skip TLS verification on the registry
+  -j, --jobs int                 The maximum number of concurrent builds (default GOMAXPROCS)
+  -L, --local                    Load into images to local docker daemon.
+      --oci-layout-path string   Path to save the OCI image layout of the built images
+      --platform strings         Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*
+  -P, --preserve-import-paths    Whether to preserve the full import path after KO_DOCKER_REPO.
+      --push                     Push images to KO_DOCKER_REPO (default true)
+      --sbom string              The SBOM media type to use (none will disable SBOM synthesis and upload, also supports: spdx, cyclonedx, go.version-m). (default "spdx")
+      --sbom-dir string          Path to file where the SBOM will be written.
+      --tag-only                 Include tags but not digests in resolved image references. Useful when digests are not preserved when images are repopulated.
+  -t, --tags strings             Which tags to use for the produced image instead of the default 'latest' tag (may not work properly with --base-import-paths or --bare). (default [latest])
+      --tarball string           File to save images tarballs
+
+

Options inherited from parent commands

+
  -v, --verbose   Enable debug logs
+
+

SEE ALSO

+
    +
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
  • +
+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/reference/ko_create/index.html b/reference/ko_create/index.html new file mode 100644 index 0000000000..90cc1facc6 --- /dev/null +++ b/reference/ko_create/index.html @@ -0,0 +1,947 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ko create - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

ko create

+ +

ko create

+

Create the input files with image references resolved to built/pushed image digests.

+

Synopsis

+

This sub-command finds import path references within the provided files, builds them into Go binaries, containerizes them, publishes them, and then feeds the resulting yaml into "kubectl create".

+
ko create -f FILENAME [flags]
+
+

Examples

+

+  # Build and publish import path references to a Docker
+  # Registry as:
+  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>
+  # Then, feed the resulting yaml into "kubectl create".
+  # When KO_DOCKER_REPO is ko.local, it is the same as if
+  # --local was passed.
+  ko create -f config/
+
+  # Build and publish import path references to a Docker
+  # Registry preserving import path names as:
+  #   ${KO_DOCKER_REPO}/<import path>
+  # Then, feed the resulting yaml into "kubectl create".
+  ko create --preserve-import-paths -f config/
+
+  # Build and publish import path references to a Docker
+  # daemon as:
+  #   ko.local/<import path>
+  # Then, feed the resulting yaml into "kubectl create".
+  ko create --local -f config/
+
+  # Create from stdin:
+  cat config.yaml | ko create -f -
+
+  # Any flags passed after '--' are passed to 'kubectl apply' directly:
+  ko apply -f config -- --namespace=foo --kubeconfig=cfg.yaml
+
+
+

Options

+
      --bare                     Whether to just use KO_DOCKER_REPO without additional context (may not work properly with --tags).
+  -B, --base-import-paths        Whether to use the base path without MD5 hash after KO_DOCKER_REPO (may not work properly with --tags).
+      --disable-optimizations    Disable optimizations when building Go code. Useful when you want to interactively debug the created container.
+  -f, --filename strings         Filename, directory, or URL to files to use to create the resource
+  -h, --help                     help for create
+      --image-label strings      Which labels (key=value) to add to the image.
+      --image-refs string        Path to file where a list of the published image references will be written.
+      --insecure-registry        Whether to skip TLS verification on the registry
+  -j, --jobs int                 The maximum number of concurrent builds (default GOMAXPROCS)
+  -L, --local                    Load into images to local docker daemon.
+      --oci-layout-path string   Path to save the OCI image layout of the built images
+      --platform strings         Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*
+  -P, --preserve-import-paths    Whether to preserve the full import path after KO_DOCKER_REPO.
+      --push                     Push images to KO_DOCKER_REPO (default true)
+  -R, --recursive                Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
+      --sbom string              The SBOM media type to use (none will disable SBOM synthesis and upload, also supports: spdx, cyclonedx, go.version-m). (default "spdx")
+      --sbom-dir string          Path to file where the SBOM will be written.
+  -l, --selector string          Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
+      --tag-only                 Include tags but not digests in resolved image references. Useful when digests are not preserved when images are repopulated.
+  -t, --tags strings             Which tags to use for the produced image instead of the default 'latest' tag (may not work properly with --base-import-paths or --bare). (default [latest])
+      --tarball string           File to save images tarballs
+
+

Options inherited from parent commands

+
  -v, --verbose   Enable debug logs
+
+

SEE ALSO

+
    +
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
  • +
+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/reference/ko_delete/index.html b/reference/ko_delete/index.html new file mode 100644 index 0000000000..b6a5b21ff4 --- /dev/null +++ b/reference/ko_delete/index.html @@ -0,0 +1,868 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ko delete - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

ko delete

+ +

ko delete

+

See "kubectl help delete" for detailed usage.

+
ko delete [flags]
+
+

Options

+
  -h, --help   help for delete
+
+

Options inherited from parent commands

+
  -v, --verbose   Enable debug logs
+
+

SEE ALSO

+
    +
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
  • +
+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/reference/ko_login/index.html b/reference/ko_login/index.html new file mode 100644 index 0000000000..9a26ca1cc3 --- /dev/null +++ b/reference/ko_login/index.html @@ -0,0 +1,889 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ko login - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

ko login

+ +

ko login

+

Log in to a registry

+
ko login [OPTIONS] [SERVER] [flags]
+
+

Examples

+
  # Log in to reg.example.com
+  ko login reg.example.com -u AzureDiamond -p hunter2
+
+

Options

+
  -h, --help              help for login
+  -p, --password string   Password
+      --password-stdin    Take the password from stdin
+  -u, --username string   Username
+
+

Options inherited from parent commands

+
  -v, --verbose   Enable debug logs
+
+

SEE ALSO

+
    +
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
  • +
+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/reference/ko_resolve/index.html b/reference/ko_resolve/index.html new file mode 100644 index 0000000000..ae4d520f4d --- /dev/null +++ b/reference/ko_resolve/index.html @@ -0,0 +1,940 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ko resolve - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

ko resolve

+ +

ko resolve

+

Print the input files with image references resolved to built/pushed image digests.

+

Synopsis

+

This sub-command finds import path references within the provided files, builds them into Go binaries, containerizes them, publishes them, and prints the resulting yaml.

+
ko resolve -f FILENAME [flags]
+
+

Examples

+

+  # Build and publish import path references to a Docker
+  # Registry as:
+  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>
+  # When KO_DOCKER_REPO is ko.local, it is the same as if
+  # --local and --preserve-import-paths were passed.
+  ko resolve -f config/
+
+  # Build and publish import path references to a Docker
+  # Registry preserving import path names as:
+  #   ${KO_DOCKER_REPO}/<import path>
+  # When KO_DOCKER_REPO is ko.local, it is the same as if
+  # --local was passed.
+  ko resolve --preserve-import-paths -f config/
+
+  # Build and publish import path references to a Docker
+  # daemon as:
+  #   ko.local/<import path>
+  # This always preserves import paths.
+  ko resolve --local -f config/
+
+

Options

+
      --bare                     Whether to just use KO_DOCKER_REPO without additional context (may not work properly with --tags).
+  -B, --base-import-paths        Whether to use the base path without MD5 hash after KO_DOCKER_REPO (may not work properly with --tags).
+      --disable-optimizations    Disable optimizations when building Go code. Useful when you want to interactively debug the created container.
+  -f, --filename strings         Filename, directory, or URL to files to use to create the resource
+  -h, --help                     help for resolve
+      --image-label strings      Which labels (key=value) to add to the image.
+      --image-refs string        Path to file where a list of the published image references will be written.
+      --insecure-registry        Whether to skip TLS verification on the registry
+  -j, --jobs int                 The maximum number of concurrent builds (default GOMAXPROCS)
+  -L, --local                    Load into images to local docker daemon.
+      --oci-layout-path string   Path to save the OCI image layout of the built images
+      --platform strings         Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*
+  -P, --preserve-import-paths    Whether to preserve the full import path after KO_DOCKER_REPO.
+      --push                     Push images to KO_DOCKER_REPO (default true)
+  -R, --recursive                Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
+      --sbom string              The SBOM media type to use (none will disable SBOM synthesis and upload, also supports: spdx, cyclonedx, go.version-m). (default "spdx")
+      --sbom-dir string          Path to file where the SBOM will be written.
+  -l, --selector string          Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
+      --tag-only                 Include tags but not digests in resolved image references. Useful when digests are not preserved when images are repopulated.
+  -t, --tags strings             Which tags to use for the produced image instead of the default 'latest' tag (may not work properly with --base-import-paths or --bare). (default [latest])
+      --tarball string           File to save images tarballs
+
+

Options inherited from parent commands

+
  -v, --verbose   Enable debug logs
+
+

SEE ALSO

+
    +
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
  • +
+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/reference/ko_run/index.html b/reference/ko_run/index.html new file mode 100644 index 0000000000..e49c4a03ca --- /dev/null +++ b/reference/ko_run/index.html @@ -0,0 +1,929 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + ko run - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

ko run

+ +

ko run

+

A variant of kubectl run that containerizes IMPORTPATH first.

+

Synopsis

+

This sub-command combines "ko build" and "kubectl run" to support containerizing and running Go binaries on Kubernetes in a single command.

+
ko run IMPORTPATH [flags]
+
+

Examples

+

+  # Publish the image and run it on Kubernetes as:
+  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>
+  # When KO_DOCKER_REPO is ko.local, it is the same as if
+  # --local and --preserve-import-paths were passed.
+  ko run github.com/foo/bar/cmd/baz
+
+  # This supports relative import paths as well.
+  ko run ./cmd/baz
+
+  # You can also supply args and flags to the command.
+  ko run ./cmd/baz -- -v arg1 arg2 --yes
+
+

Options

+
      --bare                     Whether to just use KO_DOCKER_REPO without additional context (may not work properly with --tags).
+  -B, --base-import-paths        Whether to use the base path without MD5 hash after KO_DOCKER_REPO (may not work properly with --tags).
+      --disable-optimizations    Disable optimizations when building Go code. Useful when you want to interactively debug the created container.
+  -h, --help                     help for run
+      --image-label strings      Which labels (key=value) to add to the image.
+      --image-refs string        Path to file where a list of the published image references will be written.
+      --insecure-registry        Whether to skip TLS verification on the registry
+  -j, --jobs int                 The maximum number of concurrent builds (default GOMAXPROCS)
+  -L, --local                    Load into images to local docker daemon.
+      --oci-layout-path string   Path to save the OCI image layout of the built images
+      --platform strings         Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*
+  -P, --preserve-import-paths    Whether to preserve the full import path after KO_DOCKER_REPO.
+      --push                     Push images to KO_DOCKER_REPO (default true)
+      --sbom string              The SBOM media type to use (none will disable SBOM synthesis and upload, also supports: spdx, cyclonedx, go.version-m). (default "spdx")
+      --sbom-dir string          Path to file where the SBOM will be written.
+      --tag-only                 Include tags but not digests in resolved image references. Useful when digests are not preserved when images are repopulated.
+  -t, --tags strings             Which tags to use for the produced image instead of the default 'latest' tag (may not work properly with --base-import-paths or --bare). (default [latest])
+      --tarball string           File to save images tarballs
+
+

Options inherited from parent commands

+
  -v, --verbose   Enable debug logs
+
+

SEE ALSO

+
    +
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
  • +
+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/reference/ko_version/index.html b/reference/ko_version/index.html new file mode 100644 index 0000000000..60f620667b --- /dev/null +++ b/reference/ko_version/index.html @@ -0,0 +1,866 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ko version - ko: Easy Go Containers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + +
+ + +
+ +
+ + + + + + +
+
+ + + +
+
+
+ + + + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + + +
+
+ + + + + + + +

ko version

+ +

ko version

+

Print ko version.

+
ko version [flags]
+
+

Options

+
  -h, --help   help for version
+
+

Options inherited from parent commands

+
  -v, --verbose   Enable debug logs
+
+

SEE ALSO

+
    +
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
  • +
+ + + + + + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/releases/index.html b/releases/index.html new file mode 100644 index 0000000000..0b0a160209 --- /dev/null +++ b/releases/index.html @@ -0,0 +1,15 @@ + + + + + + Redirecting... + + + + + + +Redirecting... + + diff --git a/repo/index.html b/repo/index.html new file mode 100644 index 0000000000..fc85287e64 --- /dev/null +++ b/repo/index.html @@ -0,0 +1,15 @@ + + + + + + Redirecting... + + + + + + +Redirecting... + + diff --git a/search/search_index.json b/search/search_index.json new file mode 100644 index 0000000000..7394eb6db5 --- /dev/null +++ b/search/search_index.json @@ -0,0 +1 @@ +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introduction","text":"

ko makes building Go container images easy, fast, and secure by default.

ko is a simple, fast container image builder for Go applications.

It's ideal for use cases where your image contains a single Go application without many dependencies on the OS base image (e.g., no cgo, no OS package dependencies).

ko builds images by executing go build on your local machine, and as such doesn't require docker to be installed. This can make it a good fit for lightweight CI/CD use cases.

ko makes multi-platform builds easy, produces SBOMs by default, and includes support for simple YAML templating which makes it a powerful tool for Kubernetes applications.

\ud83c\udfc3 Install ko and get started!

ko is used and loved by these open source projects:

  • Knative
  • Tekton
  • Karpenter
  • Kyverno
  • Sigstore
  • Shipwright

Add your project here!

ko is a Cloud Native Computing Foundation Sandbox project.

"},{"location":"community/","title":"Community","text":""},{"location":"community/#meetings","title":"Meetings","text":"

We have a bi-weekly community meeting on Wednesdays at 1:00 AM US Eastern time, 10:00 AM US Western time. The main goal of these meetings is that we want to hear from you! We want to know what you're using ko for, what you'd like to see in ko, how we can make ko better for you. With any remaining time we can go through open issues and PRs.

We have a meeting agenda you can use to propose topics for discussion/ideas. You can also just show up and we'll figure out what to talk about.

"},{"location":"community/#slack","title":"Slack","text":"

Come discuss ko with us in the #ko-build channel on the Kubernetes Slack! See you there!

"},{"location":"configuration/","title":"Configuration","text":""},{"location":"configuration/#basic-configuration","title":"Basic Configuration","text":"

Aside from certain environment variables (see below) like KO_DOCKER_REPO, you can configure ko's behavior using a .ko.yaml file. The location of this file can be overridden with KO_CONFIG_PATH.

"},{"location":"configuration/#overriding-base-images","title":"Overriding Base Images","text":"

By default, ko bases images on cgr.dev/chainguard/static. This is a small image that provides the bare necessities to run your Go binary.

You can override this base image in two ways:

  1. To override the base image for all images ko builds, add this line to your .ko.yaml file:
defaultBaseImage: registry.example.com/base/image\n

You can also use the KO_DEFAULTBASEIMAGE environment variable to set the default base image, which overrides the YAML configuration:

KO_DEFAULTBASEIMAGE=registry.example.com/base/image ko build .\n
  1. To override the base image for certain importpaths:
baseImageOverrides:\n  github.com/my-user/my-repo/cmd/app: registry.example.com/base/for/app\n  github.com/my-user/my-repo/cmd/foo: registry.example.com/base/for/foo\n
"},{"location":"configuration/#overriding-go-build-settings","title":"Overriding Go build settings","text":"

By default, ko builds the binary with no additional build flags other than -trimpath. You can replace the default build arguments by providing build flags and ldflags using a GoReleaser influenced builds configuration section in your .ko.yaml.

builds:\n- id: foo\n  dir: .  # default is .\n  main: ./foobar/foo\n  env:\n  - GOPRIVATE=git.internal.example.com,source.developers.google.com\n  flags:\n  - -tags\n  - netgo\n  ldflags:\n  - -s -w\n  - -extldflags \"-static\"\n  - -X main.version={{.Env.VERSION}}\n- id: bar\n  dir: ./bar\n  main: .  # default is .\n  env:\n  - GOCACHE=/workspace/.gocache\n  ldflags:\n  - -s\n  - -w\n

If your repository contains multiple modules (multiple go.mod files in different directories), use the dir field to specify the directory where ko should run go build.

ko picks the entry from builds based on the import path you request. The import path is matched against the result of joining dir and main.

The paths specified in dir and main are relative to the working directory of the ko process.

The ldflags default value is [].

\ud83d\udca1 Note: Even though the configuration section is similar to the GoReleaser builds section, only the env, flags and ldflags fields are currently supported. Also, the templating support is currently limited to using environment variables only.

"},{"location":"configuration/#setting-default-platforms","title":"Setting default platforms","text":"

By default, ko builds images based on the platform it runs on. If your target platform differs from your build platform you can specify the build platform:

As a parameter See Multi-Platform Images.

In .ko.yaml Add this to your .ko.yaml file:

defaultPlatforms:\n- linux/arm64\n- linux/amd64\n

You can also use the KO_DEFAULTPLATFORMS environment variable to set the default platforms, which overrides the YAML configuration:

KO_DEFAULTPLATFORMS=linux/arm64,linux/amd64\n
"},{"location":"configuration/#environment-variables-advanced","title":"Environment Variables (advanced)","text":"

For ease of use, backward compatibility and advanced use cases, ko supports the following environment variables to influence the build process.

Variable Default Value Description KO_DOCKER_REPO (not set) Container repository where to push images built with ko (required) KO_GO_PATH go go binary to use for builds, relative or absolute path, otherwise looked up via $PATH (optional) KO_CONFIG_PATH ./ko.yaml Path to ko configuration file (optional) KOCACHE (not set) This tells ko to store a local mapping between the go build inputs to the image layer that they produce, so go build can be skipped entirely if the layer is already present in the image registry (optional)."},{"location":"configuration/#naming-images","title":"Naming Images","text":"

ko provides a few different strategies for naming the image it pushes, to workaround certain registry limitations and user preferences:

Given KO_DOCKER_REPO=registry.example.com/repo, by default, ko build ./cmd/app will produce an image named like registry.example.com/repo/app-<md5>, which includes the MD5 hash of the full import path, to avoid collisions.

  • --preserve-import-path (-P) will include the entire importpath: registry.example.com/repo/github.com/my-user/my-repo/cmd/app
  • --base-import-paths (-B) will omit the MD5 portion: registry.example.com/repo/app
  • --bare will only include the KO_DOCKER_REPO: registry.example.com/repo
"},{"location":"configuration/#local-publishing-options","title":"Local Publishing Options","text":"

ko is normally used to publish images to container image registries, identified by KO_DOCKER_REPO.

ko can also load images to a local Docker daemon, if available, by setting KO_DOCKER_REPO=ko.local, or by passing the --local (-L) flag.

Local images can be used as a base image for other ko images:

defaultBaseImage: ko.local/example/base/image\n

ko can also load images into a local KinD cluster, if available, by setting KO_DOCKER_REPO=kind.local. By default this loads into the default KinD cluster name (kind). To load into another KinD cluster, set KIND_CLUSTER_NAME=my-other-cluster.

"},{"location":"deployment/","title":"Deployment","text":"

See Kubernetes Integration for information about deploying to Kubernetes.

Because the output of ko build is an image reference, you can easily pass it to other tools that expect to take an image reference.

"},{"location":"deployment/#docker-run","title":"docker run","text":"

To run the container locally:

docker run -p 8080:8080 $(ko build ./cmd/app)\n
"},{"location":"deployment/#google-cloud-run","title":"Google Cloud Run","text":"
gcloud run deploy --image=$(ko build ./cmd/app)\n

\ud83d\udca1 Note: The image must be pushed to Google Container Registry or Artifact Registry.

"},{"location":"deployment/#flyio","title":"fly.io","text":"
flyctl launch --image=$(ko build ./cmd/app)\n

\ud83d\udca1 Note: The image must be publicly available.

"},{"location":"deployment/#aws-lambda","title":"AWS Lambda","text":"
aws lambda update-function-code \\\n  --function-name=my-function-name \\\n  --image-uri=$(ko build ./cmd/app)\n

\ud83d\udca1 Note: The image must be pushed to ECR, based on the AWS provided base image, and use the aws-lambda-go framework. See official docs for more information.

"},{"location":"deployment/#azure-container-apps","title":"Azure Container Apps","text":"
az containerapp update \\\n  --name my-container-app\n  --resource-group my-resource-group\n  --image $(ko build ./cmd/app)\n

\ud83d\udca1 Note: The image must be pushed to ACR or other registry service. See official docs for more information.

"},{"location":"get-started/","title":"Get Started","text":""},{"location":"get-started/#setup","title":"Setup","text":"

First, install ko.

"},{"location":"get-started/#authenticate","title":"Authenticate","text":"

ko depends on the authentication configured in your Docker config (typically ~/.docker/config.json).

\u2728 If you can push an image with docker push, you are already authenticated for ko! \u2728

Since ko doesn't require docker, ko login also provides a surface for logging in to a container image registry with a username and password, similar to docker login.

Additionally, even if auth is not configured in the Docker config, ko includes built-in support for authenticating to the following container registries using credentials configured in the environment:

  • Google Container Registry and Artifact Registry, using Application Default Credentials or auth configured in gcloud.
  • Amazon Elastic Container Registry, using AWS credentials
  • Azure Container Registry, using environment variables
  • GitHub Container Registry, using the GITHUB_TOKEN environment variable
"},{"location":"get-started/#choose-destination","title":"Choose Destination","text":"

ko depends on an environment variable, KO_DOCKER_REPO, to identify where it should push images that it builds. Typically this will be a remote registry, e.g.:

  • KO_DOCKER_REPO=gcr.io/my-project, or
  • KO_DOCKER_REPO=ghcr.io/my-org/my-repo, or
  • KO_DOCKER_REPO=my-dockerhub-user
"},{"location":"get-started/#build-an-image","title":"Build an Image","text":"

ko build ./cmd/app builds and pushes a container image, and prints the resulting image digest to stdout.

In this example, ./cmd/app must be a package main that defines func main().

$ ko build ./cmd/app\n...\nregistry.example.com/my-project/app-099ba5bcefdead87f92606265fb99ac0@sha256:6e398316742b7aa4a93161dce4a23bc5c545700b862b43347b941000b112ec3e\n

\ud83d\udca1 Note: Prior to v0.10, the command was called ko publish -- this is equivalent to ko build, and both commands will work and do the same thing.

The executable binary that was built from ./cmd/app is available in the image at /ko-app/app -- the binary name matches the base import path name -- and that binary is the image's entrypoint.

"},{"location":"install/","title":"Installation","text":""},{"location":"install/#install-from-github-releases","title":"Install from GitHub Releases","text":"
$ VERSION=TODO # choose the latest version (without v prefix)\n$ OS=Linux     # or Darwin\n$ ARCH=x86_64  # or arm64, i386, s390x\n

We generate SLSA3 provenance using the OpenSSF's slsa-framework/slsa-github-generator. To verify our release, install the verification tool from slsa-framework/slsa-verifier#installation and verify as follows:

$ curl -sSfL \"https://github.com/ko-build/ko/releases/download/v${VERSION}/ko_${VERSION}_${OS}_${ARCH}.tar.gz\" > ko.tar.gz\n$ curl -sSfL https://github.com/ko-build/ko/releases/download/v${VERSION}/attestation.intoto.jsonl > provenance.intoto.jsonl\n$ slsa-verifier -artifact-path ko.tar.gz -provenance provenance.intoto.jsonl -source github.com/google/ko -tag \"v${VERSION}\"\n  PASSED: Verified SLSA provenance\n
$ tar xzf ko.tar.gz ko\n$ chmod +x ./ko\n
"},{"location":"install/#install-using-homebrew","title":"Install using Homebrew","text":"
brew install ko\n
"},{"location":"install/#install-on-alpine-linux","title":"Install on Alpine Linux","text":"

Installation on Alpine requires using the testing repository

echo https://dl-cdn.alpinelinux.org/alpine/edge/testing/ >> /etc/apk/repositories\napk update\napk add ko\n
"},{"location":"install/#build-and-install-from-source","title":"Build and Install from source","text":"

With Go 1.16+, build and install the latest released version:

go install github.com/google/ko@latest\n
"},{"location":"install/#setup-on-github-actions","title":"Setup on GitHub Actions","text":"

You can use the setup-ko action to install ko and setup auth to GitHub Container Registry in a GitHub Action workflow:

steps:\n- uses: imjasonh/setup-ko@v0.6\n
"},{"location":"advanced/faq/","title":"Frequently Asked Questions","text":""},{"location":"advanced/faq/#how-can-i-set-ldflags","title":"How can I set ldflags?","text":"

Using -ldflags is a common way to embed version info in go binaries (In fact, we do this for ko!). Unfortunately, because ko wraps go build, it's not possible to use this flag directly; however, you can use the GOFLAGS environment variable instead:

GOFLAGS=\"-ldflags=-X=main.version=1.2.3\" ko build .\n

Currently, there is a limitation that does not allow to set multiple arguments in ldflags using GOFLAGS. Using -ldflags multiple times also does not work. In this use case, it works best to use the builds section in the .ko.yaml file.

"},{"location":"advanced/faq/#why-are-my-images-all-created-in-1970","title":"Why are my images all created in 1970?","text":"

In order to support reproducible builds, ko doesn't embed timestamps in the images it produces by default.

However, ko does respect the SOURCE_DATE_EPOCH environment variable, which will set the container image's timestamp accordingly.

Similarly, the KO_DATA_DATE_EPOCH environment variable can be used to set the modtime timestamp of the files in KO_DATA_PATH.

For example, you can set the container image's timestamp to the current timestamp by executing:

export SOURCE_DATE_EPOCH=$(date +%s)\n

or set the timestamp of the files in KO_DATA_PATH to the latest git commit's timestamp with:

export KO_DATA_DATE_EPOCH=$(git log -1 --format='%ct')\n
"},{"location":"advanced/faq/#can-i-build-windows-containers","title":"Can I build Windows containers?","text":"

Yes, but support for Windows containers is new, experimental, and tenuous. Be prepared to file bugs. \ud83d\udc1b

The default base image does not provide a Windows image. You can try out building a Windows container image by setting the base image to a Windows base image and building with --platform=windows/amd64 or --platform=all:

For example, to build a Windows container image, update your .ko.yaml to set the base image:

defaultBaseImage: mcr.microsoft.com/windows/nanoserver:ltsc2022\n

And build for windows/amd64.

ko build ./ --platform=windows/amd64\n
"},{"location":"advanced/faq/#known-issues","title":"Known issues \ud83d\udc1b","text":"
  • Symlinks in kodata are ignored when building Windows images; only regular files and directories will be included in the Windows image.
"},{"location":"advanced/faq/#does-ko-support-autocompletion","title":"Does ko support autocompletion?","text":"

Yes! ko completion generates a Bash/Zsh/Fish/PowerShell completion script. You can get how to load it from help document.

ko completion [bash|zsh|fish|powershell] --help\n

Or, you can source it directly:

source <(ko completion)\n
"},{"location":"advanced/faq/#does-ko-work-with-kustomize","title":"Does ko work with Kustomize?","text":"

Yes! ko resolve -f - will read and process input from stdin, so you can have ko easily process the output of the kustomize command.

kustomize build config | ko resolve -f -\n
"},{"location":"advanced/faq/#does-ko-integrate-with-other-build-and-development-tools","title":"Does ko integrate with other build and development tools?","text":"

Oh, you betcha. Here's a partial list:

  • ko support in Skaffold
  • ko support for goreleaser
  • ko task in the Tekton catalog
  • ko support in Carvel's kbld
  • ko extension for Tilt
"},{"location":"advanced/faq/#does-ko-work-with-openshift-internal-registry","title":"Does ko work with OpenShift Internal Registry?","text":"

Yes! Follow these steps:

  1. Connect to your OpenShift installation
  2. Expose the OpenShift Internal\u00a0Registry so you can push to it:
  3. Export your token to $HOME/.docker/config.json:
oc registry login --to=$HOME/.docker/config.json\n
  1. Create a namespace where you will push your images, i.e: ko-images
  2. Execute this command to set KO_DOCKER_REPO to publish images to the internal registry.
export KO_DOCKER_REPO=$(oc registry info --public)/ko-images\n
"},{"location":"advanced/go-packages/","title":"Go Packages","text":"

ko's functionality can be consumed as a library in a Go application.

To build an image, use pkg/build, and publish it with pkg/publish.

"},{"location":"advanced/limitations/","title":"Limitations","text":"

ko works best when your application has no dependencies on the underlying image.

This means ko is ideal when you don't require cgo, and builds are executed with CGO_ENABLED=0 by default.

To install other OS packages, make those available in your configured base image.

ko only supports Go applications. For a similar tool targeting Java applications, try Jib. For other languages, try apko and melange.

"},{"location":"advanced/migrating-from-dockerfile/","title":"Migrating from Dockerfile","text":"

If your Dockerfile looks like either of the examples in the official tutorial for writing a Dockerfile to containerize a Go application, you can easily migrate to use ko instead.

Let's review the best practice multi-stage Dockerfile in that tutorial first:

# syntax=docker/dockerfile:1\n\n##\n## Build\n##\nFROM golang:1.16-buster AS build\n\nWORKDIR /app\n\nCOPY go.mod ./\nCOPY go.sum ./\nRUN go mod download\n\nCOPY *.go ./\n\nRUN go build -o /docker-gs-ping\n\n##\n## Deploy\n##\nFROM gcr.io/distroless/base-debian10\n\nWORKDIR /\n\nCOPY --from=build /docker-gs-ping /docker-gs-ping\n\nEXPOSE 8080\n\nUSER nonroot:nonroot\n\nENTRYPOINT [\"/docker-gs-ping\"]\n

This Dockerfile:

  1. pulls the golang:1.16 image
  2. COPYs your local source into the container environment (COPYing go.mod and go.sum first and running go mod download, to cache dependencies in the container environment)
  3. RUNs go build on your source, inside the container, to produce an executable
  4. COPYs the executable built in the previous step into a new image, on top of a minimal distroless base image.

The result is a Go application built on a minimal base image, with an optimally cached build sequence.

After running docker build on this Dockerfile, don't forget to push that image to the registry so you can deploy it.

"},{"location":"advanced/migrating-from-dockerfile/#migrating-to-ko","title":"Migrating to ko","text":"

If your\u00a0Go source is laid out as described in the tutorial, and you've installed and set up your environment, you can simply run ko build ./ to build and push the container image to your registry.

You're done. You can delete your Dockerfile and uninstall docker.

ko takes advantage of your local Go build cache without needing to be told to, and it sets the ENTRYPOINT and uses a nonroot distroless base image by default.

To build a multi-arch image, simply add --platform=all. Compare this to the equivalent Docker instructions.

"},{"location":"features/build-cache/","title":"Build Cache","text":"

Because ko just runs go build in your normal development environment, it automatically reuses your go build cache from previous builds, making iterative development faster.

ko also avoids pushing blobs to the remote image registry if they're already present, making pushes faster.

You can make ko even faster by setting the KOCACHE environment variable. This tells ko to store a local mapping between the go build inputs to the image layer that they produce, so go build can be skipped entirely if the layer is already present in the image registry.

"},{"location":"features/k8s/","title":"Kubernetes Integration","text":"

You could stop at just building and pushing images.

But, because building images is so easy with ko, and because building with ko only requires a string importpath to identify the image, we can integrate this with YAML generation to make Kubernetes use cases much simpler.

"},{"location":"features/k8s/#yaml-changes","title":"YAML Changes","text":"

Traditionally, you might have a Kubernetes deployment, defined in a YAML file, that runs an image:

apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: my-deployment\nspec:\n  replicas: 3\n  ...\n  template:\n    spec:\n      containers:\n      - name: my-app\n        image: registry.example.com/my-app:v1.2.3\n

...which you apply to your cluster with kubectl apply:

kubectl apply -f deployment.yaml\n

With ko, you can instead reference your Go binary by its importpath, prefixed with ko://:

    ...\n    spec:\n      containers:\n      - name: my-app\n        image: ko://github.com/my-user/my-repo/cmd/app\n
"},{"location":"features/k8s/#ko-resolve","title":"ko resolve","text":"

With this small change, running ko resolve -f deployment.yaml will instruct ko to:

  1. scan the YAML file(s) for values with the ko:// prefix,
  2. for each unique ko://-prefixed string, execute ko build <importpath> to build and push an image,
  3. replace ko://-prefixed string(s) in the input YAML with the fully-specified image reference of the built image(s), as above.
  4. Print the resulting resolved YAML to stdout.

The result can be redirected to a file, to distribute to others:

ko resolve -f config/ > release.yaml\n

Taken together, ko resolve aims to make packaging, pushing, and referencing container images an invisible implementation detail of your Kubernetes deployment, and let you focus on writing code in Go.

"},{"location":"features/k8s/#ko-apply","title":"ko apply","text":"

To apply the resulting resolved YAML config, you can redirect the output of ko resolve to kubectl apply:

ko resolve -f config/ | kubectl apply -f -\n

Since this is a relatively common use case, the same functionality is available using ko apply:

ko apply -f config/\n

Also, any flags passed after -- are passed to kubectl apply directly, for example to specify context and kubeconfig:

ko apply -f config -- --context=foo --kubeconfig=cfg.yaml\n

NB: This requires that kubectl is available.

"},{"location":"features/k8s/#ko-delete","title":"ko delete","text":"

To teardown resources applied using ko apply, you can run ko delete:

ko delete -f config/\n

This is purely a convenient alias for kubectl delete, and doesn't perform any builds, or delete any previously built images.

"},{"location":"features/multi-platform/","title":"Multi-Platform Images","text":"

Because Go supports cross-compilation to other CPU architectures and operating systems, ko excels at producing multi-platform images.

To build and push an image for all platforms supported by the configured base image, simply add --platform=all. This will instruct ko to look up all the supported platforms in the base image, execute GOOS=<os> GOARCH=<arch> GOARM=<variant> go build for each platform, and produce a manifest list containing an image for each platform.

You can also select specific platforms, for example, --platform=linux/amd64,linux/arm64.

ko also has experimental support for building for Windows images. See FAQ.

"},{"location":"features/sboms/","title":"SBOMs","text":"

A Software Bill of Materials (SBOM) is a list of software components that a software artifact depends on. Having a list of dependencies can be helpful in determining whether any vulnerable components were used to build the software artifact.

From v0.9+, ko generates and uploads an SBOM for every image it produces by default.

ko will generate an SBOM in the SPDX format by default, but you can select the CycloneDX format instead with the --sbom=cyclonedx flag. To disable SBOM generation, pass --sbom=none.

These SBOMs can be downloaded using the cosign download sbom command.

"},{"location":"features/static-assets/","title":"Static Assets","text":"

ko can also bundle static assets into the images it produces.

By convention, any contents of a directory named <importpath>/kodata/ will be bundled into the image, and the path where it's available in the image will be identified by the environment variable KO_DATA_PATH.

As an example, you can bundle and serve static contents in your image:

cmd/\n  app/\n    main.go\n    kodata/\n      favicon.ico\n      index.html\n

Then, in your main.go:

func main() {\n    http.Handle(\"/\", http.FileServer(http.Dir(os.Getenv(\"KO_DATA_PATH\"))))\n    log.Fatal(http.ListenAndServe(\":8080\", nil))\n}\n

You can simulate ko's behavior outside of the container image by setting the KO_DATA_PATH environment variable yourself with KO_DATA_PATH=cmd/app/kodata/ go run ./cmd/app.

\ud83d\udca1 Tip: Symlinks in kodata are followed and included as well. For example, you can include Git commit information in your image with ln -s -r .git/HEAD ./cmd/app/kodata/

Also note that http.FileServer will not serve the Last-Modified header (or validate If-Modified-Since request headers) because ko does not embed timestamps by default.

This can be supported by manually setting the KO_DATA_DATE_EPOCH environment variable during build (See FAQ).

"},{"location":"reference/ko/","title":"ko","text":""},{"location":"reference/ko/#ko","title":"ko","text":"

Rapidly iterate with Go, Containers, and Kubernetes.

ko [flags]\n
"},{"location":"reference/ko/#options","title":"Options","text":"
  -h, --help      help for ko\n  -v, --verbose   Enable debug logs\n
"},{"location":"reference/ko/#see-also","title":"SEE ALSO","text":"
  • ko apply - Apply the input files with image references resolved to built/pushed image digests.
  • ko build - Build and publish container images from the given importpaths.
  • ko create - Create the input files with image references resolved to built/pushed image digests.
  • ko delete - See \"kubectl help delete\" for detailed usage.
  • ko login - Log in to a registry
  • ko resolve - Print the input files with image references resolved to built/pushed image digests.
  • ko run - A variant of kubectl run that containerizes IMPORTPATH first.
  • ko version - Print ko version.
"},{"location":"reference/ko_apply/","title":"ko apply","text":""},{"location":"reference/ko_apply/#ko-apply","title":"ko apply","text":"

Apply the input files with image references resolved to built/pushed image digests.

"},{"location":"reference/ko_apply/#synopsis","title":"Synopsis","text":"

This sub-command finds import path references within the provided files, builds them into Go binaries, containerizes them, publishes them, and then feeds the resulting yaml into \"kubectl apply\".

ko apply -f FILENAME [flags]\n
"},{"location":"reference/ko_apply/#examples","title":"Examples","text":"
\n  # Build and publish import path references to a Docker\n  # Registry as:\n  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>\n  # Then, feed the resulting yaml into \"kubectl apply\".\n  # When KO_DOCKER_REPO is ko.local, it is the same as if\n  # --local was passed.\n  ko apply -f config/\n\n  # Build and publish import path references to a Docker\n  # Registry preserving import path names as:\n  #   ${KO_DOCKER_REPO}/<import path>\n  # Then, feed the resulting yaml into \"kubectl apply\".\n  ko apply --preserve-import-paths -f config/\n\n  # Build and publish import path references to a Docker\n  # daemon as:\n  #   ko.local/<import path>\n  # Then, feed the resulting yaml into \"kubectl apply\".\n  ko apply --local -f config/\n\n  # Apply from stdin:\n  cat config.yaml | ko apply -f -\n\n  # Any flags passed after '--' are passed to 'kubectl apply' directly:\n  ko apply -f config -- --namespace=foo --kubeconfig=cfg.yaml\n\n
"},{"location":"reference/ko_apply/#options","title":"Options","text":"
      --bare                     Whether to just use KO_DOCKER_REPO without additional context (may not work properly with --tags).\n  -B, --base-import-paths        Whether to use the base path without MD5 hash after KO_DOCKER_REPO (may not work properly with --tags).\n      --disable-optimizations    Disable optimizations when building Go code. Useful when you want to interactively debug the created container.\n  -f, --filename strings         Filename, directory, or URL to files to use to create the resource\n  -h, --help                     help for apply\n      --image-label strings      Which labels (key=value) to add to the image.\n      --image-refs string        Path to file where a list of the published image references will be written.\n      --insecure-registry        Whether to skip TLS verification on the registry\n  -j, --jobs int                 The maximum number of concurrent builds (default GOMAXPROCS)\n  -L, --local                    Load into images to local docker daemon.\n      --oci-layout-path string   Path to save the OCI image layout of the built images\n      --platform strings         Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*\n  -P, --preserve-import-paths    Whether to preserve the full import path after KO_DOCKER_REPO.\n      --push                     Push images to KO_DOCKER_REPO (default true)\n  -R, --recursive                Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.\n      --sbom string              The SBOM media type to use (none will disable SBOM synthesis and upload, also supports: spdx, cyclonedx, go.version-m). (default \"spdx\")\n      --sbom-dir string          Path to file where the SBOM will be written.\n  -l, --selector string          Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)\n      --tag-only                 Include tags but not digests in resolved image references. Useful when digests are not preserved when images are repopulated.\n  -t, --tags strings             Which tags to use for the produced image instead of the default 'latest' tag (may not work properly with --base-import-paths or --bare). (default [latest])\n      --tarball string           File to save images tarballs\n
"},{"location":"reference/ko_apply/#options-inherited-from-parent-commands","title":"Options inherited from parent commands","text":"
  -v, --verbose   Enable debug logs\n
"},{"location":"reference/ko_apply/#see-also","title":"SEE ALSO","text":"
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
"},{"location":"reference/ko_build/","title":"ko build","text":""},{"location":"reference/ko_build/#ko-build","title":"ko build","text":"

Build and publish container images from the given importpaths.

"},{"location":"reference/ko_build/#synopsis","title":"Synopsis","text":"

This sub-command builds the provided import paths into Go binaries, containerizes them, and publishes them.

ko build IMPORTPATH... [flags]\n
"},{"location":"reference/ko_build/#examples","title":"Examples","text":"
\n  # Build and publish import path references to a Docker Registry as:\n  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>\n  # When KO_DOCKER_REPO is ko.local, it is the same as if --local and\n  # --preserve-import-paths were passed.\n  # If the import path is not provided, the current working directory is the\n  # default.\n  ko build github.com/foo/bar/cmd/baz github.com/foo/bar/cmd/blah\n\n  # Build and publish a relative import path as:\n  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>\n  # When KO_DOCKER_REPO is ko.local, it is the same as if --local and\n  # --preserve-import-paths were passed.\n  ko build ./cmd/blah\n\n  # Build and publish a relative import path as:\n  #   ${KO_DOCKER_REPO}/<import path>\n  # When KO_DOCKER_REPO is ko.local, it is the same as if --local was passed.\n  ko build --preserve-import-paths ./cmd/blah\n\n  # Build and publish import path references to a Docker daemon as:\n  #   ko.local/<import path>\n  # This always preserves import paths.\n  ko build --local github.com/foo/bar/cmd/baz github.com/foo/bar/cmd/blah\n
"},{"location":"reference/ko_build/#options","title":"Options","text":"
      --bare                     Whether to just use KO_DOCKER_REPO without additional context (may not work properly with --tags).\n  -B, --base-import-paths        Whether to use the base path without MD5 hash after KO_DOCKER_REPO (may not work properly with --tags).\n      --disable-optimizations    Disable optimizations when building Go code. Useful when you want to interactively debug the created container.\n  -h, --help                     help for build\n      --image-label strings      Which labels (key=value) to add to the image.\n      --image-refs string        Path to file where a list of the published image references will be written.\n      --insecure-registry        Whether to skip TLS verification on the registry\n  -j, --jobs int                 The maximum number of concurrent builds (default GOMAXPROCS)\n  -L, --local                    Load into images to local docker daemon.\n      --oci-layout-path string   Path to save the OCI image layout of the built images\n      --platform strings         Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*\n  -P, --preserve-import-paths    Whether to preserve the full import path after KO_DOCKER_REPO.\n      --push                     Push images to KO_DOCKER_REPO (default true)\n      --sbom string              The SBOM media type to use (none will disable SBOM synthesis and upload, also supports: spdx, cyclonedx, go.version-m). (default \"spdx\")\n      --sbom-dir string          Path to file where the SBOM will be written.\n      --tag-only                 Include tags but not digests in resolved image references. Useful when digests are not preserved when images are repopulated.\n  -t, --tags strings             Which tags to use for the produced image instead of the default 'latest' tag (may not work properly with --base-import-paths or --bare). (default [latest])\n      --tarball string           File to save images tarballs\n
"},{"location":"reference/ko_build/#options-inherited-from-parent-commands","title":"Options inherited from parent commands","text":"
  -v, --verbose   Enable debug logs\n
"},{"location":"reference/ko_build/#see-also","title":"SEE ALSO","text":"
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
"},{"location":"reference/ko_create/","title":"ko create","text":""},{"location":"reference/ko_create/#ko-create","title":"ko create","text":"

Create the input files with image references resolved to built/pushed image digests.

"},{"location":"reference/ko_create/#synopsis","title":"Synopsis","text":"

This sub-command finds import path references within the provided files, builds them into Go binaries, containerizes them, publishes them, and then feeds the resulting yaml into \"kubectl create\".

ko create -f FILENAME [flags]\n
"},{"location":"reference/ko_create/#examples","title":"Examples","text":"
\n  # Build and publish import path references to a Docker\n  # Registry as:\n  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>\n  # Then, feed the resulting yaml into \"kubectl create\".\n  # When KO_DOCKER_REPO is ko.local, it is the same as if\n  # --local was passed.\n  ko create -f config/\n\n  # Build and publish import path references to a Docker\n  # Registry preserving import path names as:\n  #   ${KO_DOCKER_REPO}/<import path>\n  # Then, feed the resulting yaml into \"kubectl create\".\n  ko create --preserve-import-paths -f config/\n\n  # Build and publish import path references to a Docker\n  # daemon as:\n  #   ko.local/<import path>\n  # Then, feed the resulting yaml into \"kubectl create\".\n  ko create --local -f config/\n\n  # Create from stdin:\n  cat config.yaml | ko create -f -\n\n  # Any flags passed after '--' are passed to 'kubectl apply' directly:\n  ko apply -f config -- --namespace=foo --kubeconfig=cfg.yaml\n\n
"},{"location":"reference/ko_create/#options","title":"Options","text":"
      --bare                     Whether to just use KO_DOCKER_REPO without additional context (may not work properly with --tags).\n  -B, --base-import-paths        Whether to use the base path without MD5 hash after KO_DOCKER_REPO (may not work properly with --tags).\n      --disable-optimizations    Disable optimizations when building Go code. Useful when you want to interactively debug the created container.\n  -f, --filename strings         Filename, directory, or URL to files to use to create the resource\n  -h, --help                     help for create\n      --image-label strings      Which labels (key=value) to add to the image.\n      --image-refs string        Path to file where a list of the published image references will be written.\n      --insecure-registry        Whether to skip TLS verification on the registry\n  -j, --jobs int                 The maximum number of concurrent builds (default GOMAXPROCS)\n  -L, --local                    Load into images to local docker daemon.\n      --oci-layout-path string   Path to save the OCI image layout of the built images\n      --platform strings         Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*\n  -P, --preserve-import-paths    Whether to preserve the full import path after KO_DOCKER_REPO.\n      --push                     Push images to KO_DOCKER_REPO (default true)\n  -R, --recursive                Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.\n      --sbom string              The SBOM media type to use (none will disable SBOM synthesis and upload, also supports: spdx, cyclonedx, go.version-m). (default \"spdx\")\n      --sbom-dir string          Path to file where the SBOM will be written.\n  -l, --selector string          Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)\n      --tag-only                 Include tags but not digests in resolved image references. Useful when digests are not preserved when images are repopulated.\n  -t, --tags strings             Which tags to use for the produced image instead of the default 'latest' tag (may not work properly with --base-import-paths or --bare). (default [latest])\n      --tarball string           File to save images tarballs\n
"},{"location":"reference/ko_create/#options-inherited-from-parent-commands","title":"Options inherited from parent commands","text":"
  -v, --verbose   Enable debug logs\n
"},{"location":"reference/ko_create/#see-also","title":"SEE ALSO","text":"
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
"},{"location":"reference/ko_delete/","title":"ko delete","text":""},{"location":"reference/ko_delete/#ko-delete","title":"ko delete","text":"

See \"kubectl help delete\" for detailed usage.

ko delete [flags]\n
"},{"location":"reference/ko_delete/#options","title":"Options","text":"
  -h, --help   help for delete\n
"},{"location":"reference/ko_delete/#options-inherited-from-parent-commands","title":"Options inherited from parent commands","text":"
  -v, --verbose   Enable debug logs\n
"},{"location":"reference/ko_delete/#see-also","title":"SEE ALSO","text":"
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
"},{"location":"reference/ko_login/","title":"ko login","text":""},{"location":"reference/ko_login/#ko-login","title":"ko login","text":"

Log in to a registry

ko login [OPTIONS] [SERVER] [flags]\n
"},{"location":"reference/ko_login/#examples","title":"Examples","text":"
  # Log in to reg.example.com\n  ko login reg.example.com -u AzureDiamond -p hunter2\n
"},{"location":"reference/ko_login/#options","title":"Options","text":"
  -h, --help              help for login\n  -p, --password string   Password\n      --password-stdin    Take the password from stdin\n  -u, --username string   Username\n
"},{"location":"reference/ko_login/#options-inherited-from-parent-commands","title":"Options inherited from parent commands","text":"
  -v, --verbose   Enable debug logs\n
"},{"location":"reference/ko_login/#see-also","title":"SEE ALSO","text":"
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
"},{"location":"reference/ko_resolve/","title":"ko resolve","text":""},{"location":"reference/ko_resolve/#ko-resolve","title":"ko resolve","text":"

Print the input files with image references resolved to built/pushed image digests.

"},{"location":"reference/ko_resolve/#synopsis","title":"Synopsis","text":"

This sub-command finds import path references within the provided files, builds them into Go binaries, containerizes them, publishes them, and prints the resulting yaml.

ko resolve -f FILENAME [flags]\n
"},{"location":"reference/ko_resolve/#examples","title":"Examples","text":"
\n  # Build and publish import path references to a Docker\n  # Registry as:\n  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>\n  # When KO_DOCKER_REPO is ko.local, it is the same as if\n  # --local and --preserve-import-paths were passed.\n  ko resolve -f config/\n\n  # Build and publish import path references to a Docker\n  # Registry preserving import path names as:\n  #   ${KO_DOCKER_REPO}/<import path>\n  # When KO_DOCKER_REPO is ko.local, it is the same as if\n  # --local was passed.\n  ko resolve --preserve-import-paths -f config/\n\n  # Build and publish import path references to a Docker\n  # daemon as:\n  #   ko.local/<import path>\n  # This always preserves import paths.\n  ko resolve --local -f config/\n
"},{"location":"reference/ko_resolve/#options","title":"Options","text":"
      --bare                     Whether to just use KO_DOCKER_REPO without additional context (may not work properly with --tags).\n  -B, --base-import-paths        Whether to use the base path without MD5 hash after KO_DOCKER_REPO (may not work properly with --tags).\n      --disable-optimizations    Disable optimizations when building Go code. Useful when you want to interactively debug the created container.\n  -f, --filename strings         Filename, directory, or URL to files to use to create the resource\n  -h, --help                     help for resolve\n      --image-label strings      Which labels (key=value) to add to the image.\n      --image-refs string        Path to file where a list of the published image references will be written.\n      --insecure-registry        Whether to skip TLS verification on the registry\n  -j, --jobs int                 The maximum number of concurrent builds (default GOMAXPROCS)\n  -L, --local                    Load into images to local docker daemon.\n      --oci-layout-path string   Path to save the OCI image layout of the built images\n      --platform strings         Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*\n  -P, --preserve-import-paths    Whether to preserve the full import path after KO_DOCKER_REPO.\n      --push                     Push images to KO_DOCKER_REPO (default true)\n  -R, --recursive                Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.\n      --sbom string              The SBOM media type to use (none will disable SBOM synthesis and upload, also supports: spdx, cyclonedx, go.version-m). (default \"spdx\")\n      --sbom-dir string          Path to file where the SBOM will be written.\n  -l, --selector string          Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)\n      --tag-only                 Include tags but not digests in resolved image references. Useful when digests are not preserved when images are repopulated.\n  -t, --tags strings             Which tags to use for the produced image instead of the default 'latest' tag (may not work properly with --base-import-paths or --bare). (default [latest])\n      --tarball string           File to save images tarballs\n
"},{"location":"reference/ko_resolve/#options-inherited-from-parent-commands","title":"Options inherited from parent commands","text":"
  -v, --verbose   Enable debug logs\n
"},{"location":"reference/ko_resolve/#see-also","title":"SEE ALSO","text":"
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
"},{"location":"reference/ko_run/","title":"ko run","text":""},{"location":"reference/ko_run/#ko-run","title":"ko run","text":"

A variant of kubectl run that containerizes IMPORTPATH first.

"},{"location":"reference/ko_run/#synopsis","title":"Synopsis","text":"

This sub-command combines \"ko build\" and \"kubectl run\" to support containerizing and running Go binaries on Kubernetes in a single command.

ko run IMPORTPATH [flags]\n
"},{"location":"reference/ko_run/#examples","title":"Examples","text":"
\n  # Publish the image and run it on Kubernetes as:\n  #   ${KO_DOCKER_REPO}/<package name>-<hash of import path>\n  # When KO_DOCKER_REPO is ko.local, it is the same as if\n  # --local and --preserve-import-paths were passed.\n  ko run github.com/foo/bar/cmd/baz\n\n  # This supports relative import paths as well.\n  ko run ./cmd/baz\n\n  # You can also supply args and flags to the command.\n  ko run ./cmd/baz -- -v arg1 arg2 --yes\n
"},{"location":"reference/ko_run/#options","title":"Options","text":"
      --bare                     Whether to just use KO_DOCKER_REPO without additional context (may not work properly with --tags).\n  -B, --base-import-paths        Whether to use the base path without MD5 hash after KO_DOCKER_REPO (may not work properly with --tags).\n      --disable-optimizations    Disable optimizations when building Go code. Useful when you want to interactively debug the created container.\n  -h, --help                     help for run\n      --image-label strings      Which labels (key=value) to add to the image.\n      --image-refs string        Path to file where a list of the published image references will be written.\n      --insecure-registry        Whether to skip TLS verification on the registry\n  -j, --jobs int                 The maximum number of concurrent builds (default GOMAXPROCS)\n  -L, --local                    Load into images to local docker daemon.\n      --oci-layout-path string   Path to save the OCI image layout of the built images\n      --platform strings         Which platform to use when pulling a multi-platform base. Format: all | <os>[/<arch>[/<variant>]][,platform]*\n  -P, --preserve-import-paths    Whether to preserve the full import path after KO_DOCKER_REPO.\n      --push                     Push images to KO_DOCKER_REPO (default true)\n      --sbom string              The SBOM media type to use (none will disable SBOM synthesis and upload, also supports: spdx, cyclonedx, go.version-m). (default \"spdx\")\n      --sbom-dir string          Path to file where the SBOM will be written.\n      --tag-only                 Include tags but not digests in resolved image references. Useful when digests are not preserved when images are repopulated.\n  -t, --tags strings             Which tags to use for the produced image instead of the default 'latest' tag (may not work properly with --base-import-paths or --bare). (default [latest])\n      --tarball string           File to save images tarballs\n
"},{"location":"reference/ko_run/#options-inherited-from-parent-commands","title":"Options inherited from parent commands","text":"
  -v, --verbose   Enable debug logs\n
"},{"location":"reference/ko_run/#see-also","title":"SEE ALSO","text":"
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
"},{"location":"reference/ko_version/","title":"ko version","text":""},{"location":"reference/ko_version/#ko-version","title":"ko version","text":"

Print ko version.

ko version [flags]\n
"},{"location":"reference/ko_version/#options","title":"Options","text":"
  -h, --help   help for version\n
"},{"location":"reference/ko_version/#options-inherited-from-parent-commands","title":"Options inherited from parent commands","text":"
  -v, --verbose   Enable debug logs\n
"},{"location":"reference/ko_version/#see-also","title":"SEE ALSO","text":"
  • ko - Rapidly iterate with Go, Containers, and Kubernetes.
"}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000000..a292a71e8f --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,123 @@ + + + + https://ko.build/ + 2023-07-10 + daily + + + https://ko.build/community/ + 2023-07-10 + daily + + + https://ko.build/configuration/ + 2023-07-10 + daily + + + https://ko.build/deployment/ + 2023-07-10 + daily + + + https://ko.build/get-started/ + 2023-07-10 + daily + + + https://ko.build/install/ + 2023-07-10 + daily + + + https://ko.build/advanced/faq/ + 2023-07-10 + daily + + + https://ko.build/advanced/go-packages/ + 2023-07-10 + daily + + + https://ko.build/advanced/limitations/ + 2023-07-10 + daily + + + https://ko.build/advanced/migrating-from-dockerfile/ + 2023-07-10 + daily + + + https://ko.build/features/build-cache/ + 2023-07-10 + daily + + + https://ko.build/features/k8s/ + 2023-07-10 + daily + + + https://ko.build/features/multi-platform/ + 2023-07-10 + daily + + + https://ko.build/features/sboms/ + 2023-07-10 + daily + + + https://ko.build/features/static-assets/ + 2023-07-10 + daily + + + https://ko.build/reference/ko/ + 2023-07-10 + daily + + + https://ko.build/reference/ko_apply/ + 2023-07-10 + daily + + + https://ko.build/reference/ko_build/ + 2023-07-10 + daily + + + https://ko.build/reference/ko_create/ + 2023-07-10 + daily + + + https://ko.build/reference/ko_delete/ + 2023-07-10 + daily + + + https://ko.build/reference/ko_login/ + 2023-07-10 + daily + + + https://ko.build/reference/ko_resolve/ + 2023-07-10 + daily + + + https://ko.build/reference/ko_run/ + 2023-07-10 + daily + + + https://ko.build/reference/ko_version/ + 2023-07-10 + daily + + \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz new file mode 100644 index 0000000000..bb6e7a5ac1 Binary files /dev/null and b/sitemap.xml.gz differ diff --git a/slack/index.html b/slack/index.html new file mode 100644 index 0000000000..3e39fea85c --- /dev/null +++ b/slack/index.html @@ -0,0 +1,15 @@ + + + + + + Redirecting... + + + + + + +Redirecting... + + diff --git a/terraform/index.html b/terraform/index.html new file mode 100644 index 0000000000..61e8435690 --- /dev/null +++ b/terraform/index.html @@ -0,0 +1,15 @@ + + + + + + Redirecting... + + + + + + +Redirecting... + +