blob: 7d15ebc060ae701a19fc89590736dffeec118235 [file] [log] [blame]
"use strict";(self.webpackChunkdocs_v_2=self.webpackChunkdocs_v_2||[]).push([[7228],{95788:(e,a,n)=>{n.d(a,{Iu:()=>p,yg:()=>g});var t=n(11504);function r(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function i(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function l(e){for(var a=1;a<arguments.length;a++){var n=null!=arguments[a]?arguments[a]:{};a%2?i(Object(n),!0).forEach((function(a){r(e,a,n[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))}))}return e}function o(e,a){if(null==e)return{};var n,t,r=function(e,a){if(null==e)return{};var n,t,r={},i=Object.keys(e);for(t=0;t<i.length;t++)n=i[t],a.indexOf(n)>=0||(r[n]=e[n]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)n=i[t],a.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=t.createContext({}),d=function(e){var a=t.useContext(s),n=a;return e&&(n="function"==typeof e?e(a):l(l({},a),e)),n},p=function(e){var a=d(e.components);return t.createElement(s.Provider,{value:a},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},c=t.forwardRef((function(e,a){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=d(n),c=r,g=u["".concat(s,".").concat(c)]||u[c]||m[c]||i;return n?t.createElement(g,l(l({ref:a},p),{},{components:n})):t.createElement(g,l({ref:a},p))}));function g(e,a){var n=arguments,r=a&&a.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=c;var o={};for(var s in a)hasOwnProperty.call(a,s)&&(o[s]=a[s]);o.originalType=e,o[u]="string"==typeof e?e:r,l[1]=o;for(var d=2;d<i;d++)l[d]=n[d];return t.createElement.apply(null,l)}return t.createElement.apply(null,n)}c.displayName="MDXCreateElement"},41680:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var t=n(86404),r=(n(11504),n(95788));const i={},l="Docker Images and Tags",o={unversionedId:"installation/docker",id:"installation/docker",title:"Docker Images and Tags",description:"The Apache Superset community extensively uses Docker for development, release,",source:"@site/docs/installation/docker.mdx",sourceDirName:"installation",slug:"/installation/docker",permalink:"/docs/installation/docker",draft:!1,editUrl:"https://github.com/apache/superset/edit/master/docs/docs/installation/docker.mdx",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Setup SSH Tunneling",permalink:"/docs/installation/setup-ssh-tunneling"},next:{title:"Creating Your First Dashboard",permalink:"/docs/creating-charts-dashboards/creating-your-first-dashboard"}},s={},d=[{value:"Key Image Tags and Examples",id:"key-image-tags-and-examples",level:2},{value:"Caching",id:"caching",level:2},{value:"About database drivers",id:"about-database-drivers",level:2},{value:"On supporting arm64 AND amd64",id:"on-supporting-arm64-and-amd64",level:2},{value:"Working with Apple silicon",id:"working-with-apple-silicon",level:3}],p={toc:d},u="wrapper";function m(e){let{components:a,...n}=e;return(0,r.yg)(u,(0,t.c)({},p,n,{components:a,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"docker-images-and-tags"},"Docker Images and Tags"),(0,r.yg)("p",null,"The Apache Superset community extensively uses Docker for development, release,\nand productionizing Superset. This page details our Docker builds and tag naming\nschemes to help users navigate our offerings."),(0,r.yg)("p",null,"Images are built and pushed to the ",(0,r.yg)("a",{parentName:"p",href:"https://hub.docker.com/r/apache/superset"},"Superset Docker Hub repository"),". Different sets of images are created for:"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Published releases")," (",(0,r.yg)("inlineCode",{parentName:"li"},"release"),"): with tags like ",(0,r.yg)("inlineCode",{parentName:"li"},"3.0.0")," and the ",(0,r.yg)("inlineCode",{parentName:"li"},"latest")," tag.\nThose are multi-platform (arm+amd). More on that later."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Pull request iterations")," (",(0,r.yg)("inlineCode",{parentName:"li"},"pull_request"),"):, each identified by tags starting with a SHA like\n",(0,r.yg)("inlineCode",{parentName:"li"},"8a2f7d378ab13c156fa183d9284b607ed69f5ecc"),", and ",(0,r.yg)("inlineCode",{parentName:"li"},"pr-3454"),", referencing the pull\nrequest ID."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Merges to the main branch")," (",(0,r.yg)("inlineCode",{parentName:"li"},"push"),"): resulting in new SHAs, with tags\nprefixed with ",(0,r.yg)("inlineCode",{parentName:"li"},"master")," for the latest ",(0,r.yg)("inlineCode",{parentName:"li"},"master")," version.")),(0,r.yg)("p",null,"Each CI build run has multiple builds for different purposes, identified by suffixes:"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Build preset:")," We offer various images for different needs:",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"lean"),": The default Docker image, including both frontend and backend. Tags\nwithout a build_preset are lean builds, e.g., ",(0,r.yg)("inlineCode",{parentName:"li"},"latest"),"."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"dev"),": For development, with a headless browser and root access."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"py310"),", e.g., Py310: Similar to lean but with a different Python version (in this example, 3.10)."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"ci"),": For certain CI workloads."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"websocket"),": For Superset clusters supporting advanced features."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"dockerize"),": Used by Helm."))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Platform:")," We build for ",(0,r.yg)("inlineCode",{parentName:"li"},"linux/arm64")," and ",(0,r.yg)("inlineCode",{parentName:"li"},"linux/amd64"),". The ",(0,r.yg)("inlineCode",{parentName:"li"},"-arm")," suffix\nindicates ARM builds (e.g., ",(0,r.yg)("inlineCode",{parentName:"li"},"latest-arm"),"), while tags without a suffix are for\nAMD (e.g., ",(0,r.yg)("inlineCode",{parentName:"li"},"latest"),").")),(0,r.yg)("h2",{id:"key-image-tags-and-examples"},"Key Image Tags and Examples"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"latest"),": The latest official release build, implicitly the lean build on\n",(0,r.yg)("inlineCode",{parentName:"li"},"linux/amd64"),"."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"latest-dev"),": the ",(0,r.yg)("inlineCode",{parentName:"li"},"-dev")," image of the latest official release build, with a\nheadless browser and root access."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"master"),": The latest build from the ",(0,r.yg)("inlineCode",{parentName:"li"},"master")," branch, implicitly lean on\n",(0,r.yg)("inlineCode",{parentName:"li"},"linux/amd64"),"."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"master-dev"),": Similar to ",(0,r.yg)("inlineCode",{parentName:"li"},"master")," but includes a headless browser and root access."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"pr-5252"),": The latest commit in PR 5252."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"30948dc401b40982cb7c0dbf6ebbe443b2748c1b-dev-arm"),": A ",(0,r.yg)("inlineCode",{parentName:"li"},"linux/arm64")," build for\nthis specific SHA, which could be from a pull request, master merge, or release."),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"30948dc-dev-arm"),": Same as above, but SHA truncated to 7 characters for a\nshorter handle on the same image"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"websocket-latest"),": The WebSocket image for use in a Superset cluster.")),(0,r.yg)("p",null,"For insights or modifications to the build matrix and tagging conventions,\ncheck the ",(0,r.yg)("a",{parentName:"p",href:"https://github.com/apache/superset/blob/master/scripts/build_docker.py"},"build_docker.py"),"\nscript and the ",(0,r.yg)("a",{parentName:"p",href:"https://github.com/apache/superset/blob/master/.github/workflows/docker.yml"},"docker.yml"),"\nGitHub action."),(0,r.yg)("h2",{id:"caching"},"Caching"),(0,r.yg)("p",null,"To accelerate builds, we follow Docker best practices and use ",(0,r.yg)("inlineCode",{parentName:"p"},"apache/superset-cache"),"."),(0,r.yg)("h2",{id:"about-database-drivers"},"About database drivers"),(0,r.yg)("p",null,"Our docker images come with little to zero database driver support since\neach envrionment requires different drivers, and mataining a build with\nwide database support would be both challenging (dozens of databases,\npython drivers, and os dependencies) and inefficient (longer\nbuild times, larger images, lower layer cache hit rate, ...)."),(0,r.yg)("p",null,"For production use cases, we recommend that you derive our ",(0,r.yg)("inlineCode",{parentName:"p"},"lean")," image(s) and\nadd database support for the database you need."),(0,r.yg)("h2",{id:"on-supporting-arm64-and-amd64"},"On supporting arm64 AND amd64"),(0,r.yg)("p",null,"Only the release builds are multi-platform, supporting ",(0,r.yg)("inlineCode",{parentName:"p"},"linux/arm64"),"\nand ",(0,r.yg)("inlineCode",{parentName:"p"},"linux/amd64"),". This enables higher level constructs like ",(0,r.yg)("inlineCode",{parentName:"p"},"helm")," and\ndocker-compose to point to these images and effectively be multi-platform\nas well."),(0,r.yg)("p",null,"Pull requests and master builds\nare one-image-per-platform so that they can be parallized and the\nbuild matrix for those is more sparse as we don't need to build every\nbuild preset on every platform, and generally can be more selective here.\nFor those builds, we suffix tags with ",(0,r.yg)("inlineCode",{parentName:"p"},"-arm")," where it applies."),(0,r.yg)("h3",{id:"working-with-apple-silicon"},"Working with Apple silicon"),(0,r.yg)("p",null,"Apple's current generation of computers uses ARM-based CPUs, and Docker\nrunning on MACs seem to require ",(0,r.yg)("inlineCode",{parentName:"p"},"linux/arm64/v8")," (at least one user's M2 was\nconfigured in that way). Setting the environment\nvariable ",(0,r.yg)("inlineCode",{parentName:"p"},"DOCKER_DEFAULT_PLATFORM")," to ",(0,r.yg)("inlineCode",{parentName:"p"},"linux/amd64")," seems to function in\nterm of leveraging, and building upon the Superset builds provided here."),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"export DOCKER_DEFAULT_PLATFORM=linux/amd64\n")),(0,r.yg)("p",null,"Presumably, ",(0,r.yg)("inlineCode",{parentName:"p"},"linux/arm64/v8")," would be more optimized for this generation\nof chips, but less compatible across the ARM ecosystem."))}m.isMDXComponent=!0}}]);