1"use strict";(self.webpackChunkgit_cliff_website=self.webpackChunkgit_cliff_website||[]).push([[8458],{1577:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"docker","title":"Docker","description":"Images","source":"@site/docs/docker.md","sourceDirName":".","slug":"/docker","permalink":"/docs/docker","draft":false,"unlisted":false,"editUrl":"https://github.com/orhun/git-cliff/tree/main/website/docs/docker.md","tags":[],"version":"current","sidebarPosition":8,"frontMatter":{"sidebar_position":8},"sidebar":"tutorialSidebar","previous":{"title":"Python \ud83d\udc0d","permalink":"/docs/integration/python"},"next":{"title":"GitHub Actions","permalink":"/docs/category/github-actions"}}');var r=n(4848),s=n(8453);const c={sidebar_position:8},o="Docker",l={},a=[{value:"Images",id:"images",level:3},{value:"Usage",id:"usage",level:3},{value:"Tags",id:"tags",level:3},{value:"Building",id:"building",level:3}];function d(e){const i={a:"a",code:"code",h1:"h1",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.header,{children:(0,r.jsx)(i.h1,{id:"docker",children:"Docker"})}),"\n",(0,r.jsx)(i.h3,{id:"images",children:"Images"}),"\n",(0,r.jsxs)(i.p,{children:["Docker builds are ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/tree/main/.github/workflows/docker.yml",children:"automated"})," and images are available in the following registries:"]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsx)(i.li,{children:(0,r.jsx)(i.a,{href:"https://hub.docker.com/r/orhunp/git-cliff",children:"Docker Hub"})}),"\n",(0,r.jsx)(i.li,{children:(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/pkgs/container/git-cliff%2Fgit-cliff",children:"GitHub Container Registry"})}),"\n"]}),"\n",(0,r.jsx)(i.h3,{id:"usage",children:"Usage"}),"\n",(0,r.jsxs)(i.p,{children:["The easiest way of running ",(0,r.jsx)(i.strong,{children:"git-cliff"})," (in the git root directory with ",(0,r.jsx)(i.a,{href:"/docs/configuration",children:"configuration file"})," present) is to use the available tags from ",(0,r.jsx)(i.a,{href:"https://hub.docker.com/r/orhunp/git-cliff",children:"Docker Hub"}),":"]}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-bash",children:'docker run -t -v "$(pwd)":/app/ "orhunp/git-cliff:${TAG:-latest}"\n'})}),"\n",(0,r.jsxs)(i.p,{children:["Or you can use the image from the ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/pkgs/container/git-cliff%2Fgit-cliff",children:"GitHub Package Registry"}),":"]}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-bash",children:'docker run -t -v "$(pwd)":/app/ "ghcr.io/orhun/git-cliff/git-cliff:${TAG:-latest}"\n'})}),"\n",(0,r.jsx)(i.h3,{id:"tags",children:"Tags"}),"\n",(0,r.jsx)(i.p,{children:"Tags are generated from the CI and follow these rules:"}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.code,{children:"latest"}),": only on version tag builds"]}),"\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.code,{children:"main"}),": only on pushes to the ",(0,r.jsx)(i.code,{children:"main"})," branch"]}),"\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.code,{children:"sha-<short>"}),": commit SHA builds (e.g. ",(0,r.jsx)(i.code,{children:"sha-954106f"}),")"]}),"\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.code,{children:"X.Y.Z"}),": SemVer tag derived from Git tag (e.g. ",(0,r.jsx)(i.code,{children:"2.12.0"}),")"]}),"\n"]}),"\n",(0,r.jsx)(i.h3,{id:"building",children:"Building"}),"\n",(0,r.jsxs)(i.p,{children:["Custom Docker images can be built from the ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/blob/main/Dockerfile",children:"Dockerfile"}),":"]}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-bash",children:"DOCKER_BUILDKIT=1 docker build -t git-cliff .\n"})})]})}function h(e={}){const{wrapper:i}={...(0,s.R)(),...e.components};return i?(0,r.jsx)(i,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,i,n)=>{n.d(i,{R:()=>c,x:()=>o});var t=n(6540);const r={},s=t.createContext(r);function c(e){const i=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function o(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),t.createElement(s.Provider,{value:i},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.