blob: dfe12cfe2c81958dacc0bf68010f001949bacc33 [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 i(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function r(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?r(Object(n),!0).forEach((function(a){i(e,a,n[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(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,i=function(e,a){if(null==e)return{};var n,t,i={},r=Object.keys(e);for(t=0;t<r.length;t++)n=r[t],a.indexOf(n)>=0||(i[n]=e[n]);return i}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t<r.length;t++)n=r[t],a.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}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",c={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},m=t.forwardRef((function(e,a){var n=e.components,i=e.mdxType,r=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),u=d(n),m=i,g=u["".concat(s,".").concat(m)]||u[m]||c[m]||r;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,i=a&&a.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=m;var o={};for(var s in a)hasOwnProperty.call(a,s)&&(o[s]=a[s]);o.originalType=e,o[u]="string"==typeof e?e:i,l[1]=o;for(var d=2;d<r;d++)l[d]=n[d];return t.createElement.apply(null,l)}return t.createElement.apply(null,n)}m.displayName="MDXCreateElement"},41680:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>r,metadata:()=>o,toc:()=>d});var t=n(86404),i=(n(11504),n(95788));const r={},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/tree/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 ARM builds and working with Apple silicon",id:"on-arm-builds-and-working-with-apple-silicon",level:2}],p={toc:d},u="wrapper";function c(e){let{components:a,...n}=e;return(0,i.yg)(u,(0,t.c)({},p,n,{components:a,mdxType:"MDXLayout"}),(0,i.yg)("h1",{id:"docker-images-and-tags"},"Docker Images and Tags"),(0,i.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,i.yg)("p",null,"Images are built and pushed to the ",(0,i.yg)("a",{parentName:"p",href:"https://hub.docker.com/r/apache/superset"},"Superset Docker Hub repository"),". Different sets of images are created for:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Published releases, with tags like ",(0,i.yg)("inlineCode",{parentName:"li"},"3.0.0")," and the ",(0,i.yg)("inlineCode",{parentName:"li"},"latest")," tag."),(0,i.yg)("li",{parentName:"ul"},"Pull request iterations, each identified by tags starting with a SHA like\n",(0,i.yg)("inlineCode",{parentName:"li"},"8a2f7d378ab13c156fa183d9284b607ed69f5ecc"),", and ",(0,i.yg)("inlineCode",{parentName:"li"},"pr-3454"),", referencing the pull\nrequest ID."),(0,i.yg)("li",{parentName:"ul"},"Merges to the main branch (",(0,i.yg)("inlineCode",{parentName:"li"},"master"),"), resulting in new SHAs, with tags\nprefixed with ",(0,i.yg)("inlineCode",{parentName:"li"},"master")," for the latest ",(0,i.yg)("inlineCode",{parentName:"li"},"master")," version.")),(0,i.yg)("p",null,"Each code version has multiple builds for different purposes, identified by suffixes:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Build preset:")," We offer various images for different needs:",(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},(0,i.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,i.yg)("inlineCode",{parentName:"li"},"latest"),"."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"dev"),": For development, with a headless browser and root access."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"py310"),", e.g., Py310: Similar to lean but with a different Python version (in this example, 3.10)."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"ci"),": For certain CI workloads."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"websocket"),": For Superset clusters supporting advanced features."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"dockerize"),": Used by Helm."))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Platform:")," We build for ",(0,i.yg)("inlineCode",{parentName:"li"},"linux/arm64")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"linux/amd64"),". The ",(0,i.yg)("inlineCode",{parentName:"li"},"-arm")," suffix\nindicates ARM builds (e.g., ",(0,i.yg)("inlineCode",{parentName:"li"},"latest-arm"),"), while tags without a suffix are for\nAMD (e.g., ",(0,i.yg)("inlineCode",{parentName:"li"},"latest"),").")),(0,i.yg)("h2",{id:"key-image-tags-and-examples"},"Key Image Tags and Examples"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"latest"),": The latest official release build, implicitly the lean build on\n",(0,i.yg)("inlineCode",{parentName:"li"},"linux/amd64"),"."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"latest-dev"),": the ",(0,i.yg)("inlineCode",{parentName:"li"},"-dev")," image of the latest official release build, with a headless browser and root access."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"master"),": The latest build from the ",(0,i.yg)("inlineCode",{parentName:"li"},"master")," branch, implicitly lean on\n",(0,i.yg)("inlineCode",{parentName:"li"},"linux/amd64"),"."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"master-dev"),": Similar to ",(0,i.yg)("inlineCode",{parentName:"li"},"master")," but includes a headless browser and root access."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"pr-5252"),": The latest commit in PR 5252."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"30948dc401b40982cb7c0dbf6ebbe443b2748c1b-dev-arm"),": A ",(0,i.yg)("inlineCode",{parentName:"li"},"linux/arm64")," build for\nthis specific SHA, which could be from a pull request, master merge, or release."),(0,i.yg)("li",{parentName:"ul"},(0,i.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,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"websocket-latest"),": The WebSocket image for use in a Superset cluster.")),(0,i.yg)("p",null,"For insights or modifications to the build matrix and tagging conventions,\ncheck the ",(0,i.yg)("a",{parentName:"p",href:"https://github.com/apache/superset/blob/master/scripts/build_docker.py"},"build_docker.py"),"\nscript and the ",(0,i.yg)("a",{parentName:"p",href:"https://github.com/apache/superset/blob/master/.github/workflows/docker.yml"},"docker.yml"),"\nGitHub action."),(0,i.yg)("h2",{id:"caching"},"Caching"),(0,i.yg)("p",null,"To accelerate builds, we follow Docker best practices and use ",(0,i.yg)("inlineCode",{parentName:"p"},"apache/superset-cache"),"."),(0,i.yg)("h2",{id:"about-database-drivers"},"About database drivers"),(0,i.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,i.yg)("p",null,"For production use cases, we recommend that you derive our ",(0,i.yg)("inlineCode",{parentName:"p"},"lean")," image(s) and\nadd database support for the database you need."),(0,i.yg)("h2",{id:"on-arm-builds-and-working-with-apple-silicon"},"On ARM builds and working with Apple silicon"),(0,i.yg)("p",null,"Apple's current generation of computers uses ARM-based CPUs, and Docker\nrunning on MACs seem to require ",(0,i.yg)("inlineCode",{parentName:"p"},"linux/arm64/v8")," (at least one user's M2 was\nconfigured in that way). Setting the environment\nvariable ",(0,i.yg)("inlineCode",{parentName:"p"},"DOCKER_DEFAULT_PLATFORM")," to ",(0,i.yg)("inlineCode",{parentName:"p"},"linux/amd64")," seems to function in\nterm of leveraging, and building upon the Superset builds provided here."),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},"export DOCKER_DEFAULT_PLATFORM=linux/amd64\n")),(0,i.yg)("p",null,"Presumably, ",(0,i.yg)("inlineCode",{parentName:"p"},"linux/arm64/v8")," would be more optimized for this generation\nof chips, but less compatible across the ARM ecosystem."))}c.isMDXComponent=!0}}]);