blob: 6208c3909782bd12c157a452738df5fb135fa36c [file] [log] [blame]
<
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Building the image &mdash; docker-stack Documentation</title>
<link rel="stylesheet" href="_static/_gen/css/main.min.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/_gen/css/main.min.css" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="_static/_gen/css/main-custom.min.css" />
<link rel="shortcut icon" href="_static/pin_32.png"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Entrypoint" href="entrypoint.html" />
<link rel="prev" title="Docker Image for Apache Airflow" href="index.html" />
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
/* We explicitly disable cookie tracking to avoid privacy issues */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '13']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head><body class="td-section">
<header>
<nav class="js-navbar-scroll navbar">
<div class="navbar__icon-container">
<a href="/">
<svg xmlns="http://www.w3.org/2000/svg" width="155.314" height="60" viewBox="0 0 155.314 60">
<defs>
<clipPath id="clip-path">
<path id="Rectangle_1" d="M0 0h155.314v60H0z" fill="none" data-name="Rectangle 1"></path>
</clipPath>
</defs>
<g id="logo" transform="translate(-1305 -780.355)">
<g id="Group_2" clip-path="url(#clip-path)" data-name="Group 2" transform="translate(1305 780.355)">
<g id="Group_1" data-name="Group 1" transform="translate(.486 .486)">
<path id="Path_1" d="M1307.562 880.867l28.187-28.893a.521.521 0 0 0 .063-.666c-1.714-2.393-4.877-2.808-6.049-4.416-3.472-4.763-4.353-7.459-5.845-7.292a.456.456 0 0 0-.271.143l-10.182 10.438c-5.858 6-6.7 19.225-6.852 30.3a.552.552 0 0 0 .949.386z" fill="#017cee" data-name="Path 1" transform="translate(-1306.613 -822.232)"></path>
<path id="Path_2" d="M1405.512 908.489l-28.893-28.189a.521.521 0 0 0-.667-.063c-2.393 1.715-2.808 4.877-4.416 6.049-4.763 3.472-7.459 4.353-7.292 5.845a.456.456 0 0 0 .143.27l10.438 10.182c6 5.858 19.225 6.7 30.3 6.852a.552.552 0 0 0 .387-.946z" fill="#00ad46" data-name="Path 2" transform="translate(-1346.876 -850.567)"></path>
<path id="Path_3" d="M1373.909 902.252c-3.28-3.2-4.8-9.53 1.486-22.583-10.219 4.567-13.8 10.57-12.039 12.289z" fill="#04d659" data-name="Path 3" transform="translate(-1345.96 -850.233)"></path>
<path id="Path_4" d="M1433.132 782.359l-28.186 28.893a.52.52 0 0 0-.063.666c1.715 2.393 4.876 2.808 6.049 4.416 3.472 4.763 4.354 7.459 5.845 7.292a.454.454 0 0 0 .271-.143l10.182-10.438c5.858-6 6.7-19.225 6.852-30.3a.553.553 0 0 0-.95-.386z" fill="#00c7d4" data-name="Path 4" transform="translate(-1375.21 -782.123)"></path>
<path id="Path_5" d="M1426.9 881.155c-3.2 3.28-9.53 4.8-22.584-1.486 4.567 10.219 10.57 13.8 12.289 12.039z" fill="#11e1ee" data-name="Path 5" transform="translate(-1374.875 -850.233)"></path>
<path id="Path_6" d="M1307 782.919l28.893 28.186a.521.521 0 0 0 .666.063c2.393-1.715 2.808-4.877 4.416-6.049 4.763-3.472 7.459-4.353 7.292-5.845a.459.459 0 0 0-.143-.271l-10.438-10.182c-6-5.858-19.225-6.7-30.3-6.852a.552.552 0 0 0-.386.95z" fill="#e43921" data-name="Path 6" transform="translate(-1306.766 -781.97)"></path>
<path id="Path_7" d="M1405.8 804.711c3.28 3.2 4.8 9.53-1.486 22.584 10.219-4.567 13.8-10.571 12.039-12.289z" fill-rule="evenodd" fill="#ff7557" data-name="Path 7" transform="translate(-1374.875 -797.859)"></path>
<path id="Path_8" d="M1329.355 849.266c3.2-3.28 9.53-4.8 22.584 1.486-4.567-10.219-10.57-13.8-12.289-12.039z" fill="#0cb6ff" data-name="Path 8" transform="translate(-1322.503 -821.316)"></path>
<circle id="Ellipse_1" cx="1.26" cy="1.26" r="1.26" fill="#4a4848" data-name="Ellipse 1" transform="translate(28.18 28.171)"></circle>
<path id="Path_9" d="M1527.558 827.347a.229.229 0 0 1-.223-.223.458.458 0 0 1 .011-.123l2.766-7.214a.346.346 0 0 1 .357-.245h.758a.348.348 0 0 1 .357.245l2.754 7.214.022.123a.228.228 0 0 1-.223.223h-.568a.288.288 0 0 1-.19-.056.352.352 0 0 1-.089-.134l-.613-1.583h-3.657l-.613 1.583a.317.317 0 0 1-.1.134.269.269 0 0 1-.178.056zm4.795-2.732l-1.505-3.958-1.505 3.958zm3.322 4.85a.258.258 0 0 1-.189-.078.241.241 0 0 1-.067-.178v-7.4a.241.241 0 0 1 .067-.178.258.258 0 0 1 .189-.078h.513a.268.268 0 0 1 .256.256v.49a2.118 2.118 0 0 1 1.828-.858 2.092 2.092 0 0 1 1.751.736 3.135 3.135 0 0 1 .636 1.9q.011.122.011.379t-.011.379a3.168 3.168 0 0 1-.636 1.9 2.111 2.111 0 0 1-1.751.736 2.154 2.154 0 0 1-1.806-.836v2.587a.241.241 0 0 1-.067.178.223.223 0 0 1-.179.078zm2.364-2.91a1.324 1.324 0 0 0 1.149-.491 2.266 2.266 0 0 0 .4-1.293q.011-.111.011-.323 0-2.107-1.562-2.107a1.365 1.365 0 0 0-1.159.513 2.111 2.111 0 0 0-.412 1.2l-.012.424.012.435a1.862 1.862 0 0 0 .424 1.149 1.4 1.4 0 0 0 1.148.493zm5.628.9a2.329 2.329 0 0 1-1.015-.223 1.94 1.94 0 0 1-.747-.6 1.487 1.487 0 0 1-.268-.859 1.459 1.459 0 0 1 .6-1.2 3.4 3.4 0 0 1 1.65-.624l1.661-.234v-.323q0-1.137-1.3-1.137a1.4 1.4 0 0 0-.8.212 1.376 1.376 0 0 0-.468.48.305.305 0 0 1-.089.145.18.18 0 0 1-.134.045h-.48a.23.23 0 0 1-.245-.245 1.17 1.17 0 0 1 .245-.6 1.931 1.931 0 0 1 .747-.591 2.7 2.7 0 0 1 1.238-.256 2.351 2.351 0 0 1 1.8.591 2.032 2.032 0 0 1 .547 1.45v3.613a.257.257 0 0 1-.078.19.24.24 0 0 1-.178.067h-.513a.233.233 0 0 1-.257-.256v-.479a1.923 1.923 0 0 1-.714.6 2.557 2.557 0 0 1-1.203.237zm.234-.836a1.579 1.579 0 0 0 1.182-.469 1.881 1.881 0 0 0 .468-1.371v-.312l-1.293.19a2.918 2.918 0 0 0-1.193.379.761.761 0 0 0-.4.658.784.784 0 0 0 .368.691 1.585 1.585 0 0 0 .867.237zm6.643.836a2.556 2.556 0 0 1-1.873-.669 2.738 2.738 0 0 1-.714-1.9l-.011-.446.011-.446a2.7 2.7 0 0 1 .714-1.885 2.531 2.531 0 0 1 1.873-.68 2.917 2.917 0 0 1 1.36.29 2.077 2.077 0 0 1 .825.714 1.7 1.7 0 0 1 .3.848.2.2 0 0 1-.067.178.281.281 0 0 1-.19.067h-.535a.265.265 0 0 1-.168-.045.458.458 0 0 1-.111-.178 1.428 1.428 0 0 0-.535-.758 1.516 1.516 0 0 0-.87-.234 1.45 1.45 0 0 0-1.1.435 1.952 1.952 0 0 0-.435 1.3l-.011.4.011.379a1.969 1.969 0 0 0 .435 1.316 1.446 1.446 0 0 0 1.1.424 1.577 1.577 0 0 0 .87-.223 1.493 1.493 0 0 0 .535-.769.458.458 0 0 1 .111-.178.228.228 0 0 1 .168-.056h.535a.258.258 0 0 1 .19.078.2.2 0 0 1 .067.178 1.75 1.75 0 0 1-.3.847 2.078 2.078 0 0 1-.825.714 2.876 2.876 0 0 1-1.361.302zm4.078-.112a.233.233 0 0 1-.257-.256v-7.4a.241.241 0 0 1 .067-.178.259.259 0 0 1 .19-.078h.557a.267.267 0 0 1 .257.256v2.6a2.167 2.167 0 0 1 .758-.624 2.353 2.353 0 0 1 1.082-.223 2.067 2.067 0 0 1 1.661.691 2.642 2.642 0 0 1 .6 1.818v3.144a.257.257 0 0 1-.078.19.24.24 0 0 1-.178.067h-.557a.233.233 0 0 1-.256-.256V824a1.775 1.775 0 0 0-.39-1.227 1.387 1.387 0 0 0-1.1-.435 1.481 1.481 0 0 0-1.126.446 1.7 1.7 0 0 0-.412 1.215v3.088a.257.257 0 0 1-.078.19.24.24 0 0 1-.178.067zm8.846.112a2.466 2.466 0 0 1-1.84-.7 2.938 2.938 0 0 1-.747-1.94l-.011-.379.011-.368a2.953 2.953 0 0 1 .758-1.918 2.7 2.7 0 0 1 3.735.078 3.114 3.114 0 0 1 .68 2.119v.19a.257.257 0 0 1-.078.189.241.241 0 0 1-.178.067h-3.858v.1a2.11 2.11 0 0 0 .435 1.238 1.332 1.332 0 0 0 1.081.5 1.563 1.563 0 0 0 .836-.2 1.7 1.7 0 0 0 .491-.435.6.6 0 0 1 .145-.156.391.391 0 0 1 .19-.033h.547a.252.252 0 0 1 .167.056.192.192 0 0 1 .067.156.975.975 0 0 1-.312.591 2.51 2.51 0 0 1-.859.6 3.049 3.049 0 0 1-1.26.248zm1.527-3.434v-.033a1.817 1.817 0 0 0-.424-1.249 1.512 1.512 0 0 0-2.23 0 1.883 1.883 0 0 0-.4 1.249v.033z" fill="#51504f" data-name="Path 9" transform="translate(-1460.834 -808.144)"></path>
<path id="Path_10" d="M1527.2 827.081l-.061.061zm-.056-.279l-.08-.031zm2.766-7.214l.08.031zm1.472 0l-.081.029zm2.754 7.214l.084-.015a.064.064 0 0 0 0-.015zm.022.123h.086v-.015zm-.067.156l.06.061zm-.914.011l-.061.061.006.005zm-.089-.134l.081-.027zm-.613-1.583l.08-.031a.086.086 0 0 0-.08-.055zm-3.657 0v-.086a.086.086 0 0 0-.08.055zm-.613 1.583l-.08-.031zm-.1.134l.055.066zm4.047-2.676v.086a.086.086 0 0 0 .08-.116zm-1.505-3.958l.08-.03a.086.086 0 0 0-.16 0zm-1.505 3.958l-.08-.03a.086.086 0 0 0 .08.116zm-1.784 2.646a.128.128 0 0 1-.1-.042l-.122.121a.3.3 0 0 0 .217.092zm-.1-.042a.129.129 0 0 1-.042-.1h-.171a.3.3 0 0 0 .092.217zm-.042-.1a.38.38 0 0 1 .007-.1l-.163-.054a.514.514 0 0 0-.016.15zm.005-.092l2.765-7.214-.16-.061-2.765 7.214zm2.766-7.216a.283.283 0 0 1 .1-.143.3.3 0 0 1 .174-.046v-.172a.47.47 0 0 0-.271.076.453.453 0 0 0-.166.226zm.276-.189h.758v-.172h-.758zm.758 0a.3.3 0 0 1 .175.046.283.283 0 0 1 .1.143l.161-.059a.451.451 0 0 0-.166-.226.47.47 0 0 0-.272-.076zm.277.19l2.754 7.214.16-.061-2.754-7.214zm2.75 7.2l.022.123.169-.031-.022-.123zm.021.107a.13.13 0 0 1-.042.1l.121.121a.3.3 0 0 0 .092-.217zm-.042.1a.13.13 0 0 1-.1.042v.171a.3.3 0 0 0 .217-.092zm-.1.042h-.568v.171h.568zm-.568 0a.206.206 0 0 1-.135-.036l-.11.132a.373.373 0 0 0 .245.076zm-.129-.031a.262.262 0 0 1-.069-.1l-.162.054a.431.431 0 0 0 .11.167zm-.07-.1l-.613-1.584-.16.062.613 1.583zm-.693-1.638h-3.657v.171h3.657zm-3.737.055l-.614 1.584.16.062.613-1.583zm-.615 1.587a.235.235 0 0 1-.075.1l.111.13a.4.4 0 0 0 .126-.172zm-.074.1a.185.185 0 0 1-.124.036v.171a.354.354 0 0 0 .233-.076zm-.124.036h-.569v.171h.569zm4.306-2.677l-1.505-3.958-.16.061 1.505 3.958zm-1.666-3.958l-1.505 3.958.16.061 1.505-3.958zm-1.425 4.075h3.01v-.171h-3.01zm6.143 4.687l-.06.061zm0-7.761l.061.061zm.881 0l-.065.056.01.009zm.078.669h-.086a.086.086 0 0 0 .155.051zm3.579-.123l-.067.053zm.636 1.9h-.086zm0 .758l-.085-.007zm-.636 1.9l.067.054zm-3.557-.1l.068-.052a.086.086 0 0 0-.154.052zm-.067 2.765l-.061-.06zm2.787-3.323l-.069-.051zm.4-1.293l-.085-.008v.005zm-2.709-1.918l-.068-.052zm-.413 1.2h-.086zm-.011.423h-.085zm.011.435h-.086zm.424 1.149l.066-.054zm-1.216 3.315a.173.173 0 0 1-.129-.053l-.121.121a.342.342 0 0 0 .25.1zm-.129-.053a.157.157 0 0 1-.042-.118h-.172a.325.325 0 0 0 .092.239zm-.042-.118v-7.4h-.172v7.4zm0-7.4a.157.157 0 0 1 .042-.118l-.121-.121a.324.324 0 0 0-.092.239zm.042-.118a.173.173 0 0 1 .129-.053v-.172a.342.342 0 0 0-.25.1zm.129-.053h.513v-.172h-.513zm.513 0a.137.137 0 0 1 .113.048l.13-.111a.309.309 0 0 0-.244-.108zm.123.058a.137.137 0 0 1 .048.113h.171a.309.309 0 0 0-.108-.243zm.048.113v.49h.171v-.49zm.155.541a2.033 2.033 0 0 1 1.759-.823v-.171a2.2 2.2 0 0 0-1.9.894zm1.759-.823a2.007 2.007 0 0 1 1.683.7l.135-.106a2.177 2.177 0 0 0-1.818-.768zm1.683.7a3.045 3.045 0 0 1 .617 1.845l.171-.007a3.218 3.218 0 0 0-.654-1.946zm.617 1.85c.007.078.011.2.011.372h.171c0-.171 0-.3-.012-.387zm.011.372c0 .171 0 .294-.011.372l.17.015c.008-.086.012-.216.012-.387zm-.011.376a3.08 3.08 0 0 1-.617 1.846l.134.106a3.25 3.25 0 0 0 .654-1.945zm-.617 1.845a2.025 2.025 0 0 1-1.683.7v.171a2.2 2.2 0 0 0 1.817-.768zm-1.683.7a2.068 2.068 0 0 1-1.739-.8l-.136.1a2.239 2.239 0 0 0 1.874.87zm-1.892-.75v2.587h.172v-2.587zm0 2.587a.156.156 0 0 1-.042.118l.121.121a.325.325 0 0 0 .092-.239zm-.046.123a.138.138 0 0 1-.114.048v.172a.308.308 0 0 0 .244-.108zm-.114.048h-.546v.172h.546zm1.817-2.739a1.408 1.408 0 0 0 1.218-.526l-.138-.1a1.24 1.24 0 0 1-1.079.455zm1.217-.525a2.355 2.355 0 0 0 .419-1.341l-.171-.007a2.182 2.182 0 0 1-.385 1.246zm.418-1.336c.008-.079.012-.19.012-.332h-.172c0 .14 0 .245-.011.315zm.012-.332a2.726 2.726 0 0 0-.407-1.632 1.448 1.448 0 0 0-1.24-.562v.171a1.278 1.278 0 0 1 1.1.492 2.565 2.565 0 0 1 .374 1.53zm-1.647-2.193a1.452 1.452 0 0 0-1.228.547l.136.1a1.282 1.282 0 0 1 1.091-.479zm-1.228.547a2.2 2.2 0 0 0-.43 1.252l.172.008a2.028 2.028 0 0 1 .4-1.157zm-.43 1.254l-.011.424h.171l.011-.424zm-.011.428l.011.435h.172l-.011-.435zm.011.436a1.95 1.95 0 0 0 .443 1.2l.133-.109a1.776 1.776 0 0 1-.4-1.1zm.443 1.2a1.484 1.484 0 0 0 1.214.522v-.171a1.314 1.314 0 0 1-1.082-.459zm5.828 1.117l.037-.077zm-.747-.6l-.07.049zm.335-2.063l.052.068zm1.65-.624l.012.085zm1.661-.234l.012.085a.086.086 0 0 0 .074-.085zm-2.107-1.249l.046.072zm-.468.48l-.075-.042a.083.083 0 0 0-.006.015zm-.089.145l-.054-.067-.007.006zm-.792-.022l-.065.056.009.009zm-.067-.178h-.086zm.245-.6l-.07-.049zm.747-.591l.038.077zm3.033.334l-.063.058zm.468 5.252l.06.061zm-.881 0l-.065.056a.043.043 0 0 0 .009.009zm-.067-.669h.086a.086.086 0 0 0-.156-.048zm-.714.6l-.04-.076zm.223-1.059l-.062-.06zm.468-1.684h.086a.086.086 0 0 0-.1-.085zm-1.293.189l.012.085zm-1.193.379l.046.072zm-.033 1.349l-.047.071zm.635.985a2.241 2.241 0 0 1-.978-.215l-.074.155a2.412 2.412 0 0 0 1.051.231zm-.978-.215a1.859 1.859 0 0 1-.715-.576l-.138.1a2.024 2.024 0 0 0 .779.629zm-.713-.573a1.4 1.4 0 0 1-.253-.81h-.172a1.571 1.571 0 0 0 .283.907zm-.253-.81a1.374 1.374 0 0 1 .569-1.136l-.105-.135a1.544 1.544 0 0 0-.635 1.272zm.569-1.137a3.316 3.316 0 0 1 1.609-.607l-.024-.17a3.481 3.481 0 0 0-1.691.642zm1.609-.607l1.661-.234-.024-.17-1.662.234zm1.735-.319v-.323h-.171v.323zm0-.323a1.156 1.156 0 0 0-.355-.917 1.536 1.536 0 0 0-1.035-.306v.172a1.37 1.37 0 0 1 .922.263.986.986 0 0 1 .3.788zm-1.39-1.223a1.486 1.486 0 0 0-.851.227l.1.142a1.316 1.316 0 0 1 .755-.2zm-.849.226a1.452 1.452 0 0 0-.5.51l.15.084a1.286 1.286 0 0 1 .44-.449zm-.5.524a.226.226 0 0 1-.062.105l.107.134a.391.391 0 0 0 .117-.185zm-.068.112a.1.1 0 0 1-.073.019v.171a.266.266 0 0 0 .194-.07zm-.073.019h-.48v.171h.48zm-.48 0a.18.18 0 0 1-.122-.046l-.112.13a.352.352 0 0 0 .234.087zm-.113-.037a.18.18 0 0 1-.047-.123h-.171a.352.352 0 0 0 .087.234zm-.047-.119a1.1 1.1 0 0 1 .23-.557l-.14-.1a1.253 1.253 0 0 0-.261.648zm.23-.556a1.843 1.843 0 0 1 .715-.564l-.075-.154a2.018 2.018 0 0 0-.78.618zm.716-.564a2.611 2.611 0 0 1 1.2-.247v-.171a2.781 2.781 0 0 0-1.277.266zm1.2-.247a2.268 2.268 0 0 1 1.732.563l.126-.116a2.435 2.435 0 0 0-1.858-.618zm1.733.564a1.945 1.945 0 0 1 .523 1.391h.171a2.117 2.117 0 0 0-.57-1.508zm.523 1.391v3.613h.171v-3.613zm0 3.613a.172.172 0 0 1-.053.129l.121.121a.344.344 0 0 0 .1-.25zm-.053.129a.157.157 0 0 1-.118.042v.171a.326.326 0 0 0 .239-.092zm-.118.042h-.513v.171h.513zm-.513 0a.2.2 0 0 1-.134-.046l-.111.13a.367.367 0 0 0 .245.088zm-.124-.037a.194.194 0 0 1-.047-.134h-.171a.366.366 0 0 0 .087.245zm-.047-.134v-.479h-.171v.479zm-.156-.528a1.846 1.846 0 0 1-.683.575l.079.152a2.012 2.012 0 0 0 .745-.629zm-.683.575a2.476 2.476 0 0 1-1.153.236v.171a2.644 2.644 0 0 0 1.233-.255zm-.919-.429a1.666 1.666 0 0 0 1.244-.494l-.123-.12a1.493 1.493 0 0 1-1.121.442zm1.244-.494a1.969 1.969 0 0 0 .492-1.431h-.171a1.8 1.8 0 0 1-.444 1.312zm.492-1.431v-.312h-.171v.312zm-.1-.4l-1.293.189.025.17 1.293-.189zm-1.293.189a3 3 0 0 0-1.228.393l.095.143a2.837 2.837 0 0 1 1.158-.365zm-1.227.392a.845.845 0 0 0-.441.73h.172a.676.676 0 0 1 .362-.586zm-.441.73a.869.869 0 0 0 .406.762l.095-.142a.7.7 0 0 1-.33-.62zm.408.764a1.673 1.673 0 0 0 .916.247v-.171a1.5 1.5 0 0 1-.823-.221zm5.686.329l-.061.06zm-.714-1.9h-.085zm-.011-.446h-.085zm.011-.446h-.085zm.714-1.885l.061.061zm3.234-.39l-.04.076zm.825.713l-.073.046zm.3.848h-.086zm-.067.178l.056.065zm-.892.022l.054-.067zm-.112-.178l-.081.029zm-.535-.758l-.048.071zm-1.974.2l-.062-.059zm-.435 1.3h-.086zm-.011.4h-.086zm.011.379h-.086zm.435 1.316l-.062.059zm1.974.2l.046.072zm.535-.769l-.079-.033zm.112-.178l.054.067.007-.006zm.892.022l-.061.06zm.067.178l-.085-.009zm-.3.847l-.072-.046zm-.825.714l-.04-.076zm-1.36.2a2.471 2.471 0 0 1-1.814-.644l-.12.122a2.64 2.64 0 0 0 1.933.694zm-1.813-.643a2.653 2.653 0 0 1-.689-1.839l-.171.006a2.822 2.822 0 0 0 .738 1.952zm-.689-1.838l-.011-.446h-.171l.011.446zm-.011-.442l.011-.446h-.171l-.011.446zm.011-.445a2.611 2.611 0 0 1 .689-1.827l-.122-.121a2.78 2.78 0 0 0-.738 1.942zm.689-1.827a2.447 2.447 0 0 1 1.813-.655v-.171a2.617 2.617 0 0 0-1.934.705zm1.813-.655a2.836 2.836 0 0 1 1.32.28l.079-.152a3 3 0 0 0-1.4-.3zm1.32.28a1.99 1.99 0 0 1 .792.683l.145-.091a2.158 2.158 0 0 0-.858-.744zm.793.685a1.617 1.617 0 0 1 .287.8l.171-.009a1.789 1.789 0 0 0-.315-.89zm.287.809a.11.11 0 0 1-.037.1l.112.13a.281.281 0 0 0 .1-.252zm-.037.1a.2.2 0 0 1-.134.046v.171a.369.369 0 0 0 .246-.088zm-.134.046h-.535v.171h.535zm-.535 0a.184.184 0 0 1-.114-.026l-.107.134a.345.345 0 0 0 .221.064zm-.114-.026a.389.389 0 0 1-.086-.144l-.158.066a.533.533 0 0 0 .137.212zm-.084-.14a1.514 1.514 0 0 0-.57-.8l-.093.144a1.343 1.343 0 0 1 .5.715zm-.568-.8a1.6 1.6 0 0 0-.918-.249v.171a1.435 1.435 0 0 1 .822.219zm-.918-.249a1.535 1.535 0 0 0-1.166.462l.124.118a1.364 1.364 0 0 1 1.042-.408zm-1.166.462a2.036 2.036 0 0 0-.458 1.36l.171.006a1.872 1.872 0 0 1 .411-1.249zm-.458 1.361l-.011.4h.171l.011-.4zm-.011.406l.011.379.171-.005-.011-.379zm.011.38a2.052 2.052 0 0 0 .458 1.371l.124-.118a1.889 1.889 0 0 1-.411-1.26zm.458 1.371a1.533 1.533 0 0 0 1.166.451v-.172a1.363 1.363 0 0 1-1.042-.4zm1.166.451a1.661 1.661 0 0 0 .916-.237l-.093-.144a1.491 1.491 0 0 1-.823.209zm.918-.238a1.576 1.576 0 0 0 .568-.812l-.162-.057a1.409 1.409 0 0 1-.5.727zm.566-.807a.39.39 0 0 1 .086-.144l-.107-.134a.533.533 0 0 0-.137.213zm.093-.151a.144.144 0 0 1 .107-.031v-.171a.31.31 0 0 0-.228.081zm.107-.031h.535v-.171h-.535zm.535 0a.173.173 0 0 1 .129.053l.121-.121a.344.344 0 0 0-.25-.1zm.134.057a.11.11 0 0 1 .037.1l.17.017a.281.281 0 0 0-.1-.252zm.037.109a1.664 1.664 0 0 1-.288.806l.144.092a1.839 1.839 0 0 0 .315-.889zm-.288.806a1.989 1.989 0 0 1-.792.683l.079.152a2.162 2.162 0 0 0 .858-.744zm-.793.684a2.8 2.8 0 0 1-1.32.28v.171a2.96 2.96 0 0 0 1.4-.3zm2.568.187l-.065.056.01.009zm0-7.772l.061.06zm.926 0l-.065.056.009.009zm.078 2.776h-.085a.086.086 0 0 0 .153.053zm.758-.624l.038.077zm2.743.468l-.065.056zm.524 5.151l-.061-.06zm-.925 0l-.065.056.009.009zm-.457-4.5l-.065.056zm-2.23.011l-.062-.059zm-.49 4.493l-.061-.06zm-.736-.019a.2.2 0 0 1-.134-.046l-.112.13a.367.367 0 0 0 .245.088zm-.124-.037a.2.2 0 0 1-.046-.134h-.172a.367.367 0 0 0 .087.245zm-.046-.134v-7.4h-.172v7.4zm0-7.4a.156.156 0 0 1 .042-.118l-.121-.121a.326.326 0 0 0-.092.239zm.042-.118a.172.172 0 0 1 .129-.053v-.171a.343.343 0 0 0-.25.1zm.129-.053h.557v-.171h-.557zm.557 0a.137.137 0 0 1 .113.048l.13-.112a.308.308 0 0 0-.244-.108zm.122.057a.137.137 0 0 1 .048.113h.172a.309.309 0 0 0-.108-.243zm.048.113v2.6h.172v-2.6zm.153 2.651a2.076 2.076 0 0 1 .728-.6l-.075-.154a2.248 2.248 0 0 0-.788.649zm.73-.6a2.272 2.272 0 0 1 1.043-.214v-.171a2.438 2.438 0 0 0-1.121.232zm1.043-.214a1.982 1.982 0 0 1 1.6.661l.13-.112a2.152 2.152 0 0 0-1.727-.721zm1.6.663a2.557 2.557 0 0 1 .581 1.761h.171a2.727 2.727 0 0 0-.624-1.874zm.581 1.761v3.144h.171v-3.144zm0 3.144a.173.173 0 0 1-.053.129l.121.121a.345.345 0 0 0 .1-.25zm-.053.129a.156.156 0 0 1-.118.042v.171a.327.327 0 0 0 .239-.092zm-.118.042h-.557v.171h.557zm-.557 0a.2.2 0 0 1-.134-.046l-.112.13a.367.367 0 0 0 .245.088zm-.124-.037a.2.2 0 0 1-.046-.134h-.172a.368.368 0 0 0 .087.245zm-.046-.134V823.8h-.172v3.088zm0-3.088a1.859 1.859 0 0 0-.412-1.284l-.128.114a1.69 1.69 0 0 1 .368 1.169zm-.411-1.283a1.471 1.471 0 0 0-1.169-.464v.171a1.3 1.3 0 0 1 1.039.406zm-1.169-.464a1.566 1.566 0 0 0-1.188.473l.124.118a1.4 1.4 0 0 1 1.064-.419zm-1.188.473a1.779 1.779 0 0 0-.436 1.275h.172a1.609 1.609 0 0 1 .389-1.156zm-.436 1.275v3.088h.172V823.8zm0 3.088a.172.172 0 0 1-.053.129l.121.121a.344.344 0 0 0 .1-.25zm-.053.129a.156.156 0 0 1-.118.042v.171a.327.327 0 0 0 .239-.092zm-.118.042h-.557v.171h.557zm6.449-.505l-.062.059zm-.747-1.94h-.086zm-.012-.379h-.085v.005zm.012-.368l-.086-.006zm.758-1.918l-.061-.06zm3.735.078l-.065.056zm.6 2.5l.061.061zm-4.036.067v-.086a.086.086 0 0 0-.086.086zm0 .1h-.086zm.435 1.238l-.068.053zm1.918.3l.045.073zm.491-.435l-.069-.051zm.145-.156l.039.077h.006zm.9.022l-.055.066zm-.245.747l-.064-.057zm-.858.6l.035.078zm.267-3.189v.086a.086.086 0 0 0 .086-.086zm-.424-1.282l-.066.055zm-2.23 0l-.065-.055zm-.4 1.282h-.086a.086.086 0 0 0 .086.086zm1.528 3.349a2.38 2.38 0 0 1-1.779-.677l-.122.12a2.55 2.55 0 0 0 1.9.728zm-1.778-.676a2.86 2.86 0 0 1-.724-1.886l-.171.009a3.027 3.027 0 0 0 .771 1.995zm-.723-1.884l-.011-.379h-.171l.011.379zm-.011-.374l.011-.368-.172-.005-.011.368zm.011-.365a2.871 2.871 0 0 1 .735-1.864l-.124-.118a3.042 3.042 0 0 0-.782 1.971zm.734-1.864a2.331 2.331 0 0 1 1.756-.687v-.171a2.5 2.5 0 0 0-1.879.74zm1.756-.687a2.307 2.307 0 0 1 1.853.762l.13-.112a2.477 2.477 0 0 0-1.983-.821zm1.854.762a3.03 3.03 0 0 1 .659 2.062h.172a3.2 3.2 0 0 0-.7-2.175zm.659 2.062v.19h.172v-.19zm0 .19a.172.172 0 0 1-.053.129l.121.121a.345.345 0 0 0 .1-.25zm-.053.129a.156.156 0 0 1-.118.042v.171a.327.327 0 0 0 .239-.092zm-.118.042h-3.858v.171h3.858zm-3.944.086v.1h.172v-.1zm0 .1a2.2 2.2 0 0 0 .453 1.287l.135-.106a2.027 2.027 0 0 1-.417-1.189zm.454 1.288a1.418 1.418 0 0 0 1.148.533v-.171a1.247 1.247 0 0 1-1.015-.47zm1.148.533a1.647 1.647 0 0 0 .882-.214l-.09-.146a1.481 1.481 0 0 1-.791.188zm.882-.214a1.777 1.777 0 0 0 .515-.458l-.14-.1a1.613 1.613 0 0 1-.466.412zm.513-.456a1.251 1.251 0 0 1 .081-.1.28.28 0 0 1 .026-.025l.008-.006-.077-.153a.326.326 0 0 0-.083.068 1.55 1.55 0 0 0-.092.113zm.12-.134a.328.328 0 0 1 .146-.021v-.171a.468.468 0 0 0-.234.046zm.146-.021h.547v-.171h-.547zm.547 0a.166.166 0 0 1 .112.036l.11-.132a.337.337 0 0 0-.222-.076zm.112.036a.107.107 0 0 1 .036.09h.171a.277.277 0 0 0-.1-.222zm.036.09a.9.9 0 0 1-.291.534l.128.115a1.055 1.055 0 0 0 .334-.649zm-.291.535a2.42 2.42 0 0 1-.83.581l.072.156a2.6 2.6 0 0 0 .888-.624zm-.829.58a2.964 2.964 0 0 1-1.224.238v.171a3.133 3.133 0 0 0 1.295-.253zm.389-3.111v-.033h-.171v.033zm0-.033a1.9 1.9 0 0 0-.445-1.306l-.129.114a1.731 1.731 0 0 1 .4 1.192zm-.444-1.3a1.466 1.466 0 0 0-1.181-.521v.172a1.3 1.3 0 0 1 1.049.46zm-1.181-.521a1.466 1.466 0 0 0-1.18.521l.131.11a1.3 1.3 0 0 1 1.049-.46zm-1.181.521a1.965 1.965 0 0 0-.422 1.3h.172a1.794 1.794 0 0 1 .382-1.194zm-.422 1.3v.033h.172v-.033zm.086.119h3.055v-.171h-3.055z" fill="#51504f" data-name="Path 10" transform="translate(-1460.636 -807.945)"></path>
<path id="Path_11" d="M1519.066 884.011a.581.581 0 0 1-.567-.567 1.151 1.151 0 0 1 .028-.312l7.026-18.328a.881.881 0 0 1 .906-.623h1.926a.882.882 0 0 1 .907.623l7 18.328.057.312a.583.583 0 0 1-.567.567h-1.445a.735.735 0 0 1-.482-.142.9.9 0 0 1-.226-.34l-1.558-4.023h-9.292l-1.558 4.023a.8.8 0 0 1-.255.34.688.688 0 0 1-.453.142zm12.181-6.94l-3.824-10.056-3.823 10.055zm8.184-10.538a.592.592 0 0 1-.652-.651v-1.53a.714.714 0 0 1 .17-.482.656.656 0 0 1 .482-.2h1.785a.677.677 0 0 1 .68.68v1.53a.655.655 0 0 1-.2.481.713.713 0 0 1-.481.17zm.227 17.479a.593.593 0 0 1-.652-.652v-13.428a.611.611 0 0 1 .17-.453.656.656 0 0 1 .482-.2h1.359a.679.679 0 0 1 .652.651v13.427a.655.655 0 0 1-.2.482.613.613 0 0 1-.453.17zm6.861 0a.592.592 0 0 1-.651-.652v-13.4a.715.715 0 0 1 .17-.481.656.656 0 0 1 .482-.2h1.3a.677.677 0 0 1 .68.68v1.246a4.255 4.255 0 0 1 3.966-1.926h1.1a.679.679 0 0 1 .651.651v1.161a.566.566 0 0 1-.2.453.612.612 0 0 1-.453.17h-1.7a3.2 3.2 0 0 0-2.408.907 3.253 3.253 0 0 0-.879 2.408v8.328a.656.656 0 0 1-.2.482.716.716 0 0 1-.482.17zm12.234 0a.593.593 0 0 1-.651-.652v-11.814h-2.408a.592.592 0 0 1-.651-.651v-.963a.611.611 0 0 1 .17-.453.654.654 0 0 1 .481-.2h2.408v-1.417q0-4.816 4.872-4.815h1.586a.679.679 0 0 1 .652.651v.963a.656.656 0 0 1-.2.481.613.613 0 0 1-.453.17h-1.529a2.1 2.1 0 0 0-1.785.68 3.248 3.248 0 0 0-.51 2.011v1.275h6.062V863.7a.613.613 0 0 1 .17-.453.656.656 0 0 1 .482-.2h1.3a.679.679 0 0 1 .652.651v19.659a.655.655 0 0 1-.2.482.613.613 0 0 1-.454.17h-1.3a.592.592 0 0 1-.652-.652v-11.811h-6.062v11.813a.657.657 0 0 1-.2.482.614.614 0 0 1-.454.17zm20.9.283a6.487 6.487 0 0 1-4.844-1.757 6.837 6.837 0 0 1-1.813-4.674l-.029-1.218.029-1.218a6.732 6.732 0 0 1 1.841-4.646 7.389 7.389 0 0 1 9.631 0 6.736 6.736 0 0 1 1.841 4.646q.028.311.028 1.218t-.028 1.218a6.772 6.772 0 0 1-1.841 4.674 6.391 6.391 0 0 1-4.82 1.756zm0-2.181a3.582 3.582 0 0 0 2.8-1.133 4.931 4.931 0 0 0 1.133-3.258q.028-.283.028-1.076t-.028-1.076a4.931 4.931 0 0 0-1.133-3.258 3.582 3.582 0 0 0-2.8-1.133 3.671 3.671 0 0 0-2.833 1.133 4.83 4.83 0 0 0-1.1 3.258l-.028 1.076.028 1.076a4.83 4.83 0 0 0 1.1 3.258 3.671 3.671 0 0 0 2.828 1.132zm13.755 1.9a.846.846 0 0 1-.566-.17 1.321 1.321 0 0 1-.34-.538l-4.023-13.144-.056-.283a.575.575 0 0 1 .17-.425.641.641 0 0 1 .425-.17h1.246a.612.612 0 0 1 .453.17.646.646 0 0 1 .255.312l3.145 10.679 3.371-10.566a.761.761 0 0 1 .255-.4.726.726 0 0 1 .538-.2h.963a.728.728 0 0 1 .539.2.76.76 0 0 1 .255.4l3.371 10.566 3.144-10.679a.655.655 0 0 1 .2-.312.714.714 0 0 1 .482-.17h1.275a.542.542 0 0 1 .4.17.576.576 0 0 1 .17.425l-.057.283-3.994 13.144a1.323 1.323 0 0 1-.34.538.9.9 0 0 1-.6.17h-1.1a.86.86 0 0 1-.935-.708l-3.286-10.141-3.286 10.141a.928.928 0 0 1-.963.708z" fill="#51504f" data-name="Path 11" transform="translate(-1454.66 -838.62)"></path>
</g>
</g>
</g>
</svg>
</a>
</div>
<div class="desktop-only navbar__menu-container">
<div class="navbar__menu-content" id="main_navbar">
<div class="navbar__links-container">
<a class="navbar__text-link" href="/community/">
Community
</a>
<a class="navbar__text-link" href="/meetups/">
Meetups
</a>
<a class="navbar__text-link" href="/docs/">
Documentation
</a>
<a class="navbar__text-link" href="/use-cases/">
Use-cases
</a>
<a class="navbar__text-link" href="/announcements/">
Announcements
</a>
<a class="navbar__text-link" href="/blog/">
Blog
</a>
<a class="navbar__text-link" href="/ecosystem/">
Ecosystem
</a>
</div>
</div>
</div>
<div class="mobile-only navbar__drawer-container">
<button class="navbar__toggle-button" id="navbar-toggle-button">
<div id="hamburger-icon" class="navbar__toggle-button--icon visible">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="20" viewBox="0 0 26 20">
<g id="Group_1294" data-name="Group 1294" transform="translate(-38.791 291)">
<g id="Group_1291" data-name="Group 1291" transform="translate(39 -291)">
<rect id="Rectangle_461" width="26" height="2" fill="#51504f" data-name="Rectangle 461" rx="1" transform="translate(-.209)"></rect>
</g>
<g id="Group_1292" data-name="Group 1292" transform="translate(39 -281.822)">
<rect id="Rectangle_462" width="26" height="2" fill="#51504f" data-name="Rectangle 462" rx="1" transform="translate(-.209 -.178)"></rect>
</g>
<g id="Group_1293" data-name="Group 1293" transform="translate(39 -272.644)">
<rect id="Rectangle_463" width="26" height="2" fill="#51504f" data-name="Rectangle 463" rx="1" transform="translate(-.209 -.356)"></rect>
</g>
</g>
</svg>
</div>
<div id="close-icon" class="navbar__toggle-button--icon">
<svg xmlns="http://www.w3.org/2000/svg" width="19.799" height="19.799" viewBox="0 0 19.799 19.799">
<g id="Group_1574" data-name="Group 1574" transform="translate(-41.892 290.899)">
<g id="Group_1291" data-name="Group 1291" transform="rotate(-45 -308.114 -187.077)">
<rect id="Rectangle_461" width="26" height="2" fill="#51504f" data-name="Rectangle 461" rx="1" transform="translate(-.209)"></rect>
</g>
<g id="Group_1292" data-name="Group 1292" transform="rotate(45 372.48 -93.011)">
<rect id="Rectangle_462" width="26" height="2" fill="#51504f" data-name="Rectangle 462" rx="1" transform="translate(-.209 -.178)"></rect>
</g>
</g>
</svg>
</div>
</button>
<div class="navbar__drawer" id="navbar-drawer">
<div class="navbar__menu-content" id="main_navbar">
<div class="navbar__links-container">
<a class="navbar__text-link" href="/community/">
Community
</a>
<a class="navbar__text-link" href="/meetups/">
Meetups
</a>
<a class="navbar__text-link" href="/docs/">
Documentation
</a>
<a class="navbar__text-link" href="/use-cases/">
Use-cases
</a>
<a class="navbar__text-link" href="/announcements/">
Announcements
</a>
<a class="navbar__text-link" href="/blog/">
Blog
</a>
<a class="navbar__text-link" href="/ecosystem/">
Ecosystem
</a>
</div>
</div>
</div>
</div>
</nav>
</header>
<div class="roadmap container-fluid td-default base-layout">
<div class="content-drawer-wrapper">
<button class="content-drawer__toggle-button" id="content-open-button">
<div id="hamburger-icon" class="content-drawer__toggle-button--icon visible">
<svg xmlns="http://www.w3.org/2000/svg" width="20.005" height="13.879" viewBox="0 0 20.005 13.879">
<g id="Group_1619" data-name="Group 1619" transform="translate(271.132 -418.872)">
<g id="Group_1613" data-name="Group 1613" transform="translate(-266.229 431.045)">
<path id="Path_1337" d="M-218.5 513.215h-14.583a.259.259 0 0 1-.259-.26.259.259 0 0 1 .259-.259h14.583a.26.26 0 0 1 .259.259.259.259 0 0 1-.259.26z" fill="#51504f" data-name="Path 1337" transform="translate(233.345 -512.696)"></path>
</g>
<g id="Group_1614" data-name="Group 1614" transform="translate(-266.229 425.684)">
<path id="Path_1338" d="M-218.5 471.9h-14.583a.259.259 0 0 1-.259-.26.26.26 0 0 1 .259-.259h14.583a.26.26 0 0 1 .259.259.26.26 0 0 1-.259.26z" fill="#51504f" data-name="Path 1338" transform="translate(233.345 -471.376)"></path>
</g>
<g id="Group_1615" data-name="Group 1615" transform="translate(-266.229 420.323)">
<path id="Path_1339" d="M-218.5 430.574h-14.583a.259.259 0 0 1-.259-.259.259.259 0 0 1 .259-.259h14.583a.26.26 0 0 1 .259.259.259.259 0 0 1-.259.259z" fill="#51504f" data-name="Path 1339" transform="translate(233.345 -430.055)"></path>
</g>
<g id="Group_1616" data-name="Group 1616" transform="translate(-271.132 429.814)">
<path id="Path_1340" d="M-269.663 506.145a1.47 1.47 0 0 1-1.469-1.469 1.47 1.47 0 0 1 1.469-1.469 1.47 1.47 0 0 1 1.469 1.469 1.47 1.47 0 0 1-1.469 1.469zm0-2.418a.951.951 0 0 0-.95.95.951.951 0 0 0 .95.95.951.951 0 0 0 .95-.95.951.951 0 0 0-.95-.95z" fill="#51504f" data-name="Path 1340" transform="translate(271.132 -503.208)"></path>
</g>
<g id="Group_1617" data-name="Group 1617" transform="translate(-271.132 424.556)">
<path id="Path_1341" d="M-269.663 465.62a1.47 1.47 0 0 1-1.469-1.469 1.47 1.47 0 0 1 1.469-1.469 1.47 1.47 0 0 1 1.469 1.469 1.47 1.47 0 0 1-1.469 1.469zm0-2.418a.951.951 0 0 0-.95.95.951.951 0 0 0 .95.95.951.951 0 0 0 .95-.95.951.951 0 0 0-.95-.952z" fill="#51504f" data-name="Path 1341" transform="translate(271.132 -462.683)"></path>
</g>
<g id="Group_1618" data-name="Group 1618" transform="translate(-271.132 418.872)">
<path id="Path_1342" d="M-269.663 421.809a1.47 1.47 0 0 1-1.469-1.469 1.47 1.47 0 0 1 1.469-1.469 1.47 1.47 0 0 1 1.469 1.469 1.47 1.47 0 0 1-1.469 1.469zm0-2.418a.951.951 0 0 0-.95.95.951.951 0 0 0 .95.95.951.951 0 0 0 .95-.95.951.951 0 0 0-.95-.95z" fill="#51504f" data-name="Path 1342" transform="translate(271.132 -418.872)"></path>
</g>
</g>
</svg>
<span class="bodytext__mobile--brownish-grey">Content</span>
</div>
</button>
<nav id="content-navbar" class="navbar navbar--hidden">
<div class="navbar__icon-container">
<a href="/">
<svg xmlns="http://www.w3.org/2000/svg" width="155.314" height="60" viewBox="0 0 155.314 60">
<defs>
<clipPath id="clip-path">
<path id="Rectangle_1" d="M0 0h155.314v60H0z" fill="none" data-name="Rectangle 1"></path>
</clipPath>
</defs>
<g id="logo" transform="translate(-1305 -780.355)">
<g id="Group_2" clip-path="url(#clip-path)" data-name="Group 2" transform="translate(1305 780.355)">
<g id="Group_1" data-name="Group 1" transform="translate(.486 .486)">
<path id="Path_1" d="M1307.562 880.867l28.187-28.893a.521.521 0 0 0 .063-.666c-1.714-2.393-4.877-2.808-6.049-4.416-3.472-4.763-4.353-7.459-5.845-7.292a.456.456 0 0 0-.271.143l-10.182 10.438c-5.858 6-6.7 19.225-6.852 30.3a.552.552 0 0 0 .949.386z" fill="#017cee" data-name="Path 1" transform="translate(-1306.613 -822.232)"></path>
<path id="Path_2" d="M1405.512 908.489l-28.893-28.189a.521.521 0 0 0-.667-.063c-2.393 1.715-2.808 4.877-4.416 6.049-4.763 3.472-7.459 4.353-7.292 5.845a.456.456 0 0 0 .143.27l10.438 10.182c6 5.858 19.225 6.7 30.3 6.852a.552.552 0 0 0 .387-.946z" fill="#00ad46" data-name="Path 2" transform="translate(-1346.876 -850.567)"></path>
<path id="Path_3" d="M1373.909 902.252c-3.28-3.2-4.8-9.53 1.486-22.583-10.219 4.567-13.8 10.57-12.039 12.289z" fill="#04d659" data-name="Path 3" transform="translate(-1345.96 -850.233)"></path>
<path id="Path_4" d="M1433.132 782.359l-28.186 28.893a.52.52 0 0 0-.063.666c1.715 2.393 4.876 2.808 6.049 4.416 3.472 4.763 4.354 7.459 5.845 7.292a.454.454 0 0 0 .271-.143l10.182-10.438c5.858-6 6.7-19.225 6.852-30.3a.553.553 0 0 0-.95-.386z" fill="#00c7d4" data-name="Path 4" transform="translate(-1375.21 -782.123)"></path>
<path id="Path_5" d="M1426.9 881.155c-3.2 3.28-9.53 4.8-22.584-1.486 4.567 10.219 10.57 13.8 12.289 12.039z" fill="#11e1ee" data-name="Path 5" transform="translate(-1374.875 -850.233)"></path>
<path id="Path_6" d="M1307 782.919l28.893 28.186a.521.521 0 0 0 .666.063c2.393-1.715 2.808-4.877 4.416-6.049 4.763-3.472 7.459-4.353 7.292-5.845a.459.459 0 0 0-.143-.271l-10.438-10.182c-6-5.858-19.225-6.7-30.3-6.852a.552.552 0 0 0-.386.95z" fill="#e43921" data-name="Path 6" transform="translate(-1306.766 -781.97)"></path>
<path id="Path_7" d="M1405.8 804.711c3.28 3.2 4.8 9.53-1.486 22.584 10.219-4.567 13.8-10.571 12.039-12.289z" fill-rule="evenodd" fill="#ff7557" data-name="Path 7" transform="translate(-1374.875 -797.859)"></path>
<path id="Path_8" d="M1329.355 849.266c3.2-3.28 9.53-4.8 22.584 1.486-4.567-10.219-10.57-13.8-12.289-12.039z" fill="#0cb6ff" data-name="Path 8" transform="translate(-1322.503 -821.316)"></path>
<circle id="Ellipse_1" cx="1.26" cy="1.26" r="1.26" fill="#4a4848" data-name="Ellipse 1" transform="translate(28.18 28.171)"></circle>
<path id="Path_9" d="M1527.558 827.347a.229.229 0 0 1-.223-.223.458.458 0 0 1 .011-.123l2.766-7.214a.346.346 0 0 1 .357-.245h.758a.348.348 0 0 1 .357.245l2.754 7.214.022.123a.228.228 0 0 1-.223.223h-.568a.288.288 0 0 1-.19-.056.352.352 0 0 1-.089-.134l-.613-1.583h-3.657l-.613 1.583a.317.317 0 0 1-.1.134.269.269 0 0 1-.178.056zm4.795-2.732l-1.505-3.958-1.505 3.958zm3.322 4.85a.258.258 0 0 1-.189-.078.241.241 0 0 1-.067-.178v-7.4a.241.241 0 0 1 .067-.178.258.258 0 0 1 .189-.078h.513a.268.268 0 0 1 .256.256v.49a2.118 2.118 0 0 1 1.828-.858 2.092 2.092 0 0 1 1.751.736 3.135 3.135 0 0 1 .636 1.9q.011.122.011.379t-.011.379a3.168 3.168 0 0 1-.636 1.9 2.111 2.111 0 0 1-1.751.736 2.154 2.154 0 0 1-1.806-.836v2.587a.241.241 0 0 1-.067.178.223.223 0 0 1-.179.078zm2.364-2.91a1.324 1.324 0 0 0 1.149-.491 2.266 2.266 0 0 0 .4-1.293q.011-.111.011-.323 0-2.107-1.562-2.107a1.365 1.365 0 0 0-1.159.513 2.111 2.111 0 0 0-.412 1.2l-.012.424.012.435a1.862 1.862 0 0 0 .424 1.149 1.4 1.4 0 0 0 1.148.493zm5.628.9a2.329 2.329 0 0 1-1.015-.223 1.94 1.94 0 0 1-.747-.6 1.487 1.487 0 0 1-.268-.859 1.459 1.459 0 0 1 .6-1.2 3.4 3.4 0 0 1 1.65-.624l1.661-.234v-.323q0-1.137-1.3-1.137a1.4 1.4 0 0 0-.8.212 1.376 1.376 0 0 0-.468.48.305.305 0 0 1-.089.145.18.18 0 0 1-.134.045h-.48a.23.23 0 0 1-.245-.245 1.17 1.17 0 0 1 .245-.6 1.931 1.931 0 0 1 .747-.591 2.7 2.7 0 0 1 1.238-.256 2.351 2.351 0 0 1 1.8.591 2.032 2.032 0 0 1 .547 1.45v3.613a.257.257 0 0 1-.078.19.24.24 0 0 1-.178.067h-.513a.233.233 0 0 1-.257-.256v-.479a1.923 1.923 0 0 1-.714.6 2.557 2.557 0 0 1-1.203.237zm.234-.836a1.579 1.579 0 0 0 1.182-.469 1.881 1.881 0 0 0 .468-1.371v-.312l-1.293.19a2.918 2.918 0 0 0-1.193.379.761.761 0 0 0-.4.658.784.784 0 0 0 .368.691 1.585 1.585 0 0 0 .867.237zm6.643.836a2.556 2.556 0 0 1-1.873-.669 2.738 2.738 0 0 1-.714-1.9l-.011-.446.011-.446a2.7 2.7 0 0 1 .714-1.885 2.531 2.531 0 0 1 1.873-.68 2.917 2.917 0 0 1 1.36.29 2.077 2.077 0 0 1 .825.714 1.7 1.7 0 0 1 .3.848.2.2 0 0 1-.067.178.281.281 0 0 1-.19.067h-.535a.265.265 0 0 1-.168-.045.458.458 0 0 1-.111-.178 1.428 1.428 0 0 0-.535-.758 1.516 1.516 0 0 0-.87-.234 1.45 1.45 0 0 0-1.1.435 1.952 1.952 0 0 0-.435 1.3l-.011.4.011.379a1.969 1.969 0 0 0 .435 1.316 1.446 1.446 0 0 0 1.1.424 1.577 1.577 0 0 0 .87-.223 1.493 1.493 0 0 0 .535-.769.458.458 0 0 1 .111-.178.228.228 0 0 1 .168-.056h.535a.258.258 0 0 1 .19.078.2.2 0 0 1 .067.178 1.75 1.75 0 0 1-.3.847 2.078 2.078 0 0 1-.825.714 2.876 2.876 0 0 1-1.361.302zm4.078-.112a.233.233 0 0 1-.257-.256v-7.4a.241.241 0 0 1 .067-.178.259.259 0 0 1 .19-.078h.557a.267.267 0 0 1 .257.256v2.6a2.167 2.167 0 0 1 .758-.624 2.353 2.353 0 0 1 1.082-.223 2.067 2.067 0 0 1 1.661.691 2.642 2.642 0 0 1 .6 1.818v3.144a.257.257 0 0 1-.078.19.24.24 0 0 1-.178.067h-.557a.233.233 0 0 1-.256-.256V824a1.775 1.775 0 0 0-.39-1.227 1.387 1.387 0 0 0-1.1-.435 1.481 1.481 0 0 0-1.126.446 1.7 1.7 0 0 0-.412 1.215v3.088a.257.257 0 0 1-.078.19.24.24 0 0 1-.178.067zm8.846.112a2.466 2.466 0 0 1-1.84-.7 2.938 2.938 0 0 1-.747-1.94l-.011-.379.011-.368a2.953 2.953 0 0 1 .758-1.918 2.7 2.7 0 0 1 3.735.078 3.114 3.114 0 0 1 .68 2.119v.19a.257.257 0 0 1-.078.189.241.241 0 0 1-.178.067h-3.858v.1a2.11 2.11 0 0 0 .435 1.238 1.332 1.332 0 0 0 1.081.5 1.563 1.563 0 0 0 .836-.2 1.7 1.7 0 0 0 .491-.435.6.6 0 0 1 .145-.156.391.391 0 0 1 .19-.033h.547a.252.252 0 0 1 .167.056.192.192 0 0 1 .067.156.975.975 0 0 1-.312.591 2.51 2.51 0 0 1-.859.6 3.049 3.049 0 0 1-1.26.248zm1.527-3.434v-.033a1.817 1.817 0 0 0-.424-1.249 1.512 1.512 0 0 0-2.23 0 1.883 1.883 0 0 0-.4 1.249v.033z" fill="#51504f" data-name="Path 9" transform="translate(-1460.834 -808.144)"></path>
<path id="Path_10" d="M1527.2 827.081l-.061.061zm-.056-.279l-.08-.031zm2.766-7.214l.08.031zm1.472 0l-.081.029zm2.754 7.214l.084-.015a.064.064 0 0 0 0-.015zm.022.123h.086v-.015zm-.067.156l.06.061zm-.914.011l-.061.061.006.005zm-.089-.134l.081-.027zm-.613-1.583l.08-.031a.086.086 0 0 0-.08-.055zm-3.657 0v-.086a.086.086 0 0 0-.08.055zm-.613 1.583l-.08-.031zm-.1.134l.055.066zm4.047-2.676v.086a.086.086 0 0 0 .08-.116zm-1.505-3.958l.08-.03a.086.086 0 0 0-.16 0zm-1.505 3.958l-.08-.03a.086.086 0 0 0 .08.116zm-1.784 2.646a.128.128 0 0 1-.1-.042l-.122.121a.3.3 0 0 0 .217.092zm-.1-.042a.129.129 0 0 1-.042-.1h-.171a.3.3 0 0 0 .092.217zm-.042-.1a.38.38 0 0 1 .007-.1l-.163-.054a.514.514 0 0 0-.016.15zm.005-.092l2.765-7.214-.16-.061-2.765 7.214zm2.766-7.216a.283.283 0 0 1 .1-.143.3.3 0 0 1 .174-.046v-.172a.47.47 0 0 0-.271.076.453.453 0 0 0-.166.226zm.276-.189h.758v-.172h-.758zm.758 0a.3.3 0 0 1 .175.046.283.283 0 0 1 .1.143l.161-.059a.451.451 0 0 0-.166-.226.47.47 0 0 0-.272-.076zm.277.19l2.754 7.214.16-.061-2.754-7.214zm2.75 7.2l.022.123.169-.031-.022-.123zm.021.107a.13.13 0 0 1-.042.1l.121.121a.3.3 0 0 0 .092-.217zm-.042.1a.13.13 0 0 1-.1.042v.171a.3.3 0 0 0 .217-.092zm-.1.042h-.568v.171h.568zm-.568 0a.206.206 0 0 1-.135-.036l-.11.132a.373.373 0 0 0 .245.076zm-.129-.031a.262.262 0 0 1-.069-.1l-.162.054a.431.431 0 0 0 .11.167zm-.07-.1l-.613-1.584-.16.062.613 1.583zm-.693-1.638h-3.657v.171h3.657zm-3.737.055l-.614 1.584.16.062.613-1.583zm-.615 1.587a.235.235 0 0 1-.075.1l.111.13a.4.4 0 0 0 .126-.172zm-.074.1a.185.185 0 0 1-.124.036v.171a.354.354 0 0 0 .233-.076zm-.124.036h-.569v.171h.569zm4.306-2.677l-1.505-3.958-.16.061 1.505 3.958zm-1.666-3.958l-1.505 3.958.16.061 1.505-3.958zm-1.425 4.075h3.01v-.171h-3.01zm6.143 4.687l-.06.061zm0-7.761l.061.061zm.881 0l-.065.056.01.009zm.078.669h-.086a.086.086 0 0 0 .155.051zm3.579-.123l-.067.053zm.636 1.9h-.086zm0 .758l-.085-.007zm-.636 1.9l.067.054zm-3.557-.1l.068-.052a.086.086 0 0 0-.154.052zm-.067 2.765l-.061-.06zm2.787-3.323l-.069-.051zm.4-1.293l-.085-.008v.005zm-2.709-1.918l-.068-.052zm-.413 1.2h-.086zm-.011.423h-.085zm.011.435h-.086zm.424 1.149l.066-.054zm-1.216 3.315a.173.173 0 0 1-.129-.053l-.121.121a.342.342 0 0 0 .25.1zm-.129-.053a.157.157 0 0 1-.042-.118h-.172a.325.325 0 0 0 .092.239zm-.042-.118v-7.4h-.172v7.4zm0-7.4a.157.157 0 0 1 .042-.118l-.121-.121a.324.324 0 0 0-.092.239zm.042-.118a.173.173 0 0 1 .129-.053v-.172a.342.342 0 0 0-.25.1zm.129-.053h.513v-.172h-.513zm.513 0a.137.137 0 0 1 .113.048l.13-.111a.309.309 0 0 0-.244-.108zm.123.058a.137.137 0 0 1 .048.113h.171a.309.309 0 0 0-.108-.243zm.048.113v.49h.171v-.49zm.155.541a2.033 2.033 0 0 1 1.759-.823v-.171a2.2 2.2 0 0 0-1.9.894zm1.759-.823a2.007 2.007 0 0 1 1.683.7l.135-.106a2.177 2.177 0 0 0-1.818-.768zm1.683.7a3.045 3.045 0 0 1 .617 1.845l.171-.007a3.218 3.218 0 0 0-.654-1.946zm.617 1.85c.007.078.011.2.011.372h.171c0-.171 0-.3-.012-.387zm.011.372c0 .171 0 .294-.011.372l.17.015c.008-.086.012-.216.012-.387zm-.011.376a3.08 3.08 0 0 1-.617 1.846l.134.106a3.25 3.25 0 0 0 .654-1.945zm-.617 1.845a2.025 2.025 0 0 1-1.683.7v.171a2.2 2.2 0 0 0 1.817-.768zm-1.683.7a2.068 2.068 0 0 1-1.739-.8l-.136.1a2.239 2.239 0 0 0 1.874.87zm-1.892-.75v2.587h.172v-2.587zm0 2.587a.156.156 0 0 1-.042.118l.121.121a.325.325 0 0 0 .092-.239zm-.046.123a.138.138 0 0 1-.114.048v.172a.308.308 0 0 0 .244-.108zm-.114.048h-.546v.172h.546zm1.817-2.739a1.408 1.408 0 0 0 1.218-.526l-.138-.1a1.24 1.24 0 0 1-1.079.455zm1.217-.525a2.355 2.355 0 0 0 .419-1.341l-.171-.007a2.182 2.182 0 0 1-.385 1.246zm.418-1.336c.008-.079.012-.19.012-.332h-.172c0 .14 0 .245-.011.315zm.012-.332a2.726 2.726 0 0 0-.407-1.632 1.448 1.448 0 0 0-1.24-.562v.171a1.278 1.278 0 0 1 1.1.492 2.565 2.565 0 0 1 .374 1.53zm-1.647-2.193a1.452 1.452 0 0 0-1.228.547l.136.1a1.282 1.282 0 0 1 1.091-.479zm-1.228.547a2.2 2.2 0 0 0-.43 1.252l.172.008a2.028 2.028 0 0 1 .4-1.157zm-.43 1.254l-.011.424h.171l.011-.424zm-.011.428l.011.435h.172l-.011-.435zm.011.436a1.95 1.95 0 0 0 .443 1.2l.133-.109a1.776 1.776 0 0 1-.4-1.1zm.443 1.2a1.484 1.484 0 0 0 1.214.522v-.171a1.314 1.314 0 0 1-1.082-.459zm5.828 1.117l.037-.077zm-.747-.6l-.07.049zm.335-2.063l.052.068zm1.65-.624l.012.085zm1.661-.234l.012.085a.086.086 0 0 0 .074-.085zm-2.107-1.249l.046.072zm-.468.48l-.075-.042a.083.083 0 0 0-.006.015zm-.089.145l-.054-.067-.007.006zm-.792-.022l-.065.056.009.009zm-.067-.178h-.086zm.245-.6l-.07-.049zm.747-.591l.038.077zm3.033.334l-.063.058zm.468 5.252l.06.061zm-.881 0l-.065.056a.043.043 0 0 0 .009.009zm-.067-.669h.086a.086.086 0 0 0-.156-.048zm-.714.6l-.04-.076zm.223-1.059l-.062-.06zm.468-1.684h.086a.086.086 0 0 0-.1-.085zm-1.293.189l.012.085zm-1.193.379l.046.072zm-.033 1.349l-.047.071zm.635.985a2.241 2.241 0 0 1-.978-.215l-.074.155a2.412 2.412 0 0 0 1.051.231zm-.978-.215a1.859 1.859 0 0 1-.715-.576l-.138.1a2.024 2.024 0 0 0 .779.629zm-.713-.573a1.4 1.4 0 0 1-.253-.81h-.172a1.571 1.571 0 0 0 .283.907zm-.253-.81a1.374 1.374 0 0 1 .569-1.136l-.105-.135a1.544 1.544 0 0 0-.635 1.272zm.569-1.137a3.316 3.316 0 0 1 1.609-.607l-.024-.17a3.481 3.481 0 0 0-1.691.642zm1.609-.607l1.661-.234-.024-.17-1.662.234zm1.735-.319v-.323h-.171v.323zm0-.323a1.156 1.156 0 0 0-.355-.917 1.536 1.536 0 0 0-1.035-.306v.172a1.37 1.37 0 0 1 .922.263.986.986 0 0 1 .3.788zm-1.39-1.223a1.486 1.486 0 0 0-.851.227l.1.142a1.316 1.316 0 0 1 .755-.2zm-.849.226a1.452 1.452 0 0 0-.5.51l.15.084a1.286 1.286 0 0 1 .44-.449zm-.5.524a.226.226 0 0 1-.062.105l.107.134a.391.391 0 0 0 .117-.185zm-.068.112a.1.1 0 0 1-.073.019v.171a.266.266 0 0 0 .194-.07zm-.073.019h-.48v.171h.48zm-.48 0a.18.18 0 0 1-.122-.046l-.112.13a.352.352 0 0 0 .234.087zm-.113-.037a.18.18 0 0 1-.047-.123h-.171a.352.352 0 0 0 .087.234zm-.047-.119a1.1 1.1 0 0 1 .23-.557l-.14-.1a1.253 1.253 0 0 0-.261.648zm.23-.556a1.843 1.843 0 0 1 .715-.564l-.075-.154a2.018 2.018 0 0 0-.78.618zm.716-.564a2.611 2.611 0 0 1 1.2-.247v-.171a2.781 2.781 0 0 0-1.277.266zm1.2-.247a2.268 2.268 0 0 1 1.732.563l.126-.116a2.435 2.435 0 0 0-1.858-.618zm1.733.564a1.945 1.945 0 0 1 .523 1.391h.171a2.117 2.117 0 0 0-.57-1.508zm.523 1.391v3.613h.171v-3.613zm0 3.613a.172.172 0 0 1-.053.129l.121.121a.344.344 0 0 0 .1-.25zm-.053.129a.157.157 0 0 1-.118.042v.171a.326.326 0 0 0 .239-.092zm-.118.042h-.513v.171h.513zm-.513 0a.2.2 0 0 1-.134-.046l-.111.13a.367.367 0 0 0 .245.088zm-.124-.037a.194.194 0 0 1-.047-.134h-.171a.366.366 0 0 0 .087.245zm-.047-.134v-.479h-.171v.479zm-.156-.528a1.846 1.846 0 0 1-.683.575l.079.152a2.012 2.012 0 0 0 .745-.629zm-.683.575a2.476 2.476 0 0 1-1.153.236v.171a2.644 2.644 0 0 0 1.233-.255zm-.919-.429a1.666 1.666 0 0 0 1.244-.494l-.123-.12a1.493 1.493 0 0 1-1.121.442zm1.244-.494a1.969 1.969 0 0 0 .492-1.431h-.171a1.8 1.8 0 0 1-.444 1.312zm.492-1.431v-.312h-.171v.312zm-.1-.4l-1.293.189.025.17 1.293-.189zm-1.293.189a3 3 0 0 0-1.228.393l.095.143a2.837 2.837 0 0 1 1.158-.365zm-1.227.392a.845.845 0 0 0-.441.73h.172a.676.676 0 0 1 .362-.586zm-.441.73a.869.869 0 0 0 .406.762l.095-.142a.7.7 0 0 1-.33-.62zm.408.764a1.673 1.673 0 0 0 .916.247v-.171a1.5 1.5 0 0 1-.823-.221zm5.686.329l-.061.06zm-.714-1.9h-.085zm-.011-.446h-.085zm.011-.446h-.085zm.714-1.885l.061.061zm3.234-.39l-.04.076zm.825.713l-.073.046zm.3.848h-.086zm-.067.178l.056.065zm-.892.022l.054-.067zm-.112-.178l-.081.029zm-.535-.758l-.048.071zm-1.974.2l-.062-.059zm-.435 1.3h-.086zm-.011.4h-.086zm.011.379h-.086zm.435 1.316l-.062.059zm1.974.2l.046.072zm.535-.769l-.079-.033zm.112-.178l.054.067.007-.006zm.892.022l-.061.06zm.067.178l-.085-.009zm-.3.847l-.072-.046zm-.825.714l-.04-.076zm-1.36.2a2.471 2.471 0 0 1-1.814-.644l-.12.122a2.64 2.64 0 0 0 1.933.694zm-1.813-.643a2.653 2.653 0 0 1-.689-1.839l-.171.006a2.822 2.822 0 0 0 .738 1.952zm-.689-1.838l-.011-.446h-.171l.011.446zm-.011-.442l.011-.446h-.171l-.011.446zm.011-.445a2.611 2.611 0 0 1 .689-1.827l-.122-.121a2.78 2.78 0 0 0-.738 1.942zm.689-1.827a2.447 2.447 0 0 1 1.813-.655v-.171a2.617 2.617 0 0 0-1.934.705zm1.813-.655a2.836 2.836 0 0 1 1.32.28l.079-.152a3 3 0 0 0-1.4-.3zm1.32.28a1.99 1.99 0 0 1 .792.683l.145-.091a2.158 2.158 0 0 0-.858-.744zm.793.685a1.617 1.617 0 0 1 .287.8l.171-.009a1.789 1.789 0 0 0-.315-.89zm.287.809a.11.11 0 0 1-.037.1l.112.13a.281.281 0 0 0 .1-.252zm-.037.1a.2.2 0 0 1-.134.046v.171a.369.369 0 0 0 .246-.088zm-.134.046h-.535v.171h.535zm-.535 0a.184.184 0 0 1-.114-.026l-.107.134a.345.345 0 0 0 .221.064zm-.114-.026a.389.389 0 0 1-.086-.144l-.158.066a.533.533 0 0 0 .137.212zm-.084-.14a1.514 1.514 0 0 0-.57-.8l-.093.144a1.343 1.343 0 0 1 .5.715zm-.568-.8a1.6 1.6 0 0 0-.918-.249v.171a1.435 1.435 0 0 1 .822.219zm-.918-.249a1.535 1.535 0 0 0-1.166.462l.124.118a1.364 1.364 0 0 1 1.042-.408zm-1.166.462a2.036 2.036 0 0 0-.458 1.36l.171.006a1.872 1.872 0 0 1 .411-1.249zm-.458 1.361l-.011.4h.171l.011-.4zm-.011.406l.011.379.171-.005-.011-.379zm.011.38a2.052 2.052 0 0 0 .458 1.371l.124-.118a1.889 1.889 0 0 1-.411-1.26zm.458 1.371a1.533 1.533 0 0 0 1.166.451v-.172a1.363 1.363 0 0 1-1.042-.4zm1.166.451a1.661 1.661 0 0 0 .916-.237l-.093-.144a1.491 1.491 0 0 1-.823.209zm.918-.238a1.576 1.576 0 0 0 .568-.812l-.162-.057a1.409 1.409 0 0 1-.5.727zm.566-.807a.39.39 0 0 1 .086-.144l-.107-.134a.533.533 0 0 0-.137.213zm.093-.151a.144.144 0 0 1 .107-.031v-.171a.31.31 0 0 0-.228.081zm.107-.031h.535v-.171h-.535zm.535 0a.173.173 0 0 1 .129.053l.121-.121a.344.344 0 0 0-.25-.1zm.134.057a.11.11 0 0 1 .037.1l.17.017a.281.281 0 0 0-.1-.252zm.037.109a1.664 1.664 0 0 1-.288.806l.144.092a1.839 1.839 0 0 0 .315-.889zm-.288.806a1.989 1.989 0 0 1-.792.683l.079.152a2.162 2.162 0 0 0 .858-.744zm-.793.684a2.8 2.8 0 0 1-1.32.28v.171a2.96 2.96 0 0 0 1.4-.3zm2.568.187l-.065.056.01.009zm0-7.772l.061.06zm.926 0l-.065.056.009.009zm.078 2.776h-.085a.086.086 0 0 0 .153.053zm.758-.624l.038.077zm2.743.468l-.065.056zm.524 5.151l-.061-.06zm-.925 0l-.065.056.009.009zm-.457-4.5l-.065.056zm-2.23.011l-.062-.059zm-.49 4.493l-.061-.06zm-.736-.019a.2.2 0 0 1-.134-.046l-.112.13a.367.367 0 0 0 .245.088zm-.124-.037a.2.2 0 0 1-.046-.134h-.172a.367.367 0 0 0 .087.245zm-.046-.134v-7.4h-.172v7.4zm0-7.4a.156.156 0 0 1 .042-.118l-.121-.121a.326.326 0 0 0-.092.239zm.042-.118a.172.172 0 0 1 .129-.053v-.171a.343.343 0 0 0-.25.1zm.129-.053h.557v-.171h-.557zm.557 0a.137.137 0 0 1 .113.048l.13-.112a.308.308 0 0 0-.244-.108zm.122.057a.137.137 0 0 1 .048.113h.172a.309.309 0 0 0-.108-.243zm.048.113v2.6h.172v-2.6zm.153 2.651a2.076 2.076 0 0 1 .728-.6l-.075-.154a2.248 2.248 0 0 0-.788.649zm.73-.6a2.272 2.272 0 0 1 1.043-.214v-.171a2.438 2.438 0 0 0-1.121.232zm1.043-.214a1.982 1.982 0 0 1 1.6.661l.13-.112a2.152 2.152 0 0 0-1.727-.721zm1.6.663a2.557 2.557 0 0 1 .581 1.761h.171a2.727 2.727 0 0 0-.624-1.874zm.581 1.761v3.144h.171v-3.144zm0 3.144a.173.173 0 0 1-.053.129l.121.121a.345.345 0 0 0 .1-.25zm-.053.129a.156.156 0 0 1-.118.042v.171a.327.327 0 0 0 .239-.092zm-.118.042h-.557v.171h.557zm-.557 0a.2.2 0 0 1-.134-.046l-.112.13a.367.367 0 0 0 .245.088zm-.124-.037a.2.2 0 0 1-.046-.134h-.172a.368.368 0 0 0 .087.245zm-.046-.134V823.8h-.172v3.088zm0-3.088a1.859 1.859 0 0 0-.412-1.284l-.128.114a1.69 1.69 0 0 1 .368 1.169zm-.411-1.283a1.471 1.471 0 0 0-1.169-.464v.171a1.3 1.3 0 0 1 1.039.406zm-1.169-.464a1.566 1.566 0 0 0-1.188.473l.124.118a1.4 1.4 0 0 1 1.064-.419zm-1.188.473a1.779 1.779 0 0 0-.436 1.275h.172a1.609 1.609 0 0 1 .389-1.156zm-.436 1.275v3.088h.172V823.8zm0 3.088a.172.172 0 0 1-.053.129l.121.121a.344.344 0 0 0 .1-.25zm-.053.129a.156.156 0 0 1-.118.042v.171a.327.327 0 0 0 .239-.092zm-.118.042h-.557v.171h.557zm6.449-.505l-.062.059zm-.747-1.94h-.086zm-.012-.379h-.085v.005zm.012-.368l-.086-.006zm.758-1.918l-.061-.06zm3.735.078l-.065.056zm.6 2.5l.061.061zm-4.036.067v-.086a.086.086 0 0 0-.086.086zm0 .1h-.086zm.435 1.238l-.068.053zm1.918.3l.045.073zm.491-.435l-.069-.051zm.145-.156l.039.077h.006zm.9.022l-.055.066zm-.245.747l-.064-.057zm-.858.6l.035.078zm.267-3.189v.086a.086.086 0 0 0 .086-.086zm-.424-1.282l-.066.055zm-2.23 0l-.065-.055zm-.4 1.282h-.086a.086.086 0 0 0 .086.086zm1.528 3.349a2.38 2.38 0 0 1-1.779-.677l-.122.12a2.55 2.55 0 0 0 1.9.728zm-1.778-.676a2.86 2.86 0 0 1-.724-1.886l-.171.009a3.027 3.027 0 0 0 .771 1.995zm-.723-1.884l-.011-.379h-.171l.011.379zm-.011-.374l.011-.368-.172-.005-.011.368zm.011-.365a2.871 2.871 0 0 1 .735-1.864l-.124-.118a3.042 3.042 0 0 0-.782 1.971zm.734-1.864a2.331 2.331 0 0 1 1.756-.687v-.171a2.5 2.5 0 0 0-1.879.74zm1.756-.687a2.307 2.307 0 0 1 1.853.762l.13-.112a2.477 2.477 0 0 0-1.983-.821zm1.854.762a3.03 3.03 0 0 1 .659 2.062h.172a3.2 3.2 0 0 0-.7-2.175zm.659 2.062v.19h.172v-.19zm0 .19a.172.172 0 0 1-.053.129l.121.121a.345.345 0 0 0 .1-.25zm-.053.129a.156.156 0 0 1-.118.042v.171a.327.327 0 0 0 .239-.092zm-.118.042h-3.858v.171h3.858zm-3.944.086v.1h.172v-.1zm0 .1a2.2 2.2 0 0 0 .453 1.287l.135-.106a2.027 2.027 0 0 1-.417-1.189zm.454 1.288a1.418 1.418 0 0 0 1.148.533v-.171a1.247 1.247 0 0 1-1.015-.47zm1.148.533a1.647 1.647 0 0 0 .882-.214l-.09-.146a1.481 1.481 0 0 1-.791.188zm.882-.214a1.777 1.777 0 0 0 .515-.458l-.14-.1a1.613 1.613 0 0 1-.466.412zm.513-.456a1.251 1.251 0 0 1 .081-.1.28.28 0 0 1 .026-.025l.008-.006-.077-.153a.326.326 0 0 0-.083.068 1.55 1.55 0 0 0-.092.113zm.12-.134a.328.328 0 0 1 .146-.021v-.171a.468.468 0 0 0-.234.046zm.146-.021h.547v-.171h-.547zm.547 0a.166.166 0 0 1 .112.036l.11-.132a.337.337 0 0 0-.222-.076zm.112.036a.107.107 0 0 1 .036.09h.171a.277.277 0 0 0-.1-.222zm.036.09a.9.9 0 0 1-.291.534l.128.115a1.055 1.055 0 0 0 .334-.649zm-.291.535a2.42 2.42 0 0 1-.83.581l.072.156a2.6 2.6 0 0 0 .888-.624zm-.829.58a2.964 2.964 0 0 1-1.224.238v.171a3.133 3.133 0 0 0 1.295-.253zm.389-3.111v-.033h-.171v.033zm0-.033a1.9 1.9 0 0 0-.445-1.306l-.129.114a1.731 1.731 0 0 1 .4 1.192zm-.444-1.3a1.466 1.466 0 0 0-1.181-.521v.172a1.3 1.3 0 0 1 1.049.46zm-1.181-.521a1.466 1.466 0 0 0-1.18.521l.131.11a1.3 1.3 0 0 1 1.049-.46zm-1.181.521a1.965 1.965 0 0 0-.422 1.3h.172a1.794 1.794 0 0 1 .382-1.194zm-.422 1.3v.033h.172v-.033zm.086.119h3.055v-.171h-3.055z" fill="#51504f" data-name="Path 10" transform="translate(-1460.636 -807.945)"></path>
<path id="Path_11" d="M1519.066 884.011a.581.581 0 0 1-.567-.567 1.151 1.151 0 0 1 .028-.312l7.026-18.328a.881.881 0 0 1 .906-.623h1.926a.882.882 0 0 1 .907.623l7 18.328.057.312a.583.583 0 0 1-.567.567h-1.445a.735.735 0 0 1-.482-.142.9.9 0 0 1-.226-.34l-1.558-4.023h-9.292l-1.558 4.023a.8.8 0 0 1-.255.34.688.688 0 0 1-.453.142zm12.181-6.94l-3.824-10.056-3.823 10.055zm8.184-10.538a.592.592 0 0 1-.652-.651v-1.53a.714.714 0 0 1 .17-.482.656.656 0 0 1 .482-.2h1.785a.677.677 0 0 1 .68.68v1.53a.655.655 0 0 1-.2.481.713.713 0 0 1-.481.17zm.227 17.479a.593.593 0 0 1-.652-.652v-13.428a.611.611 0 0 1 .17-.453.656.656 0 0 1 .482-.2h1.359a.679.679 0 0 1 .652.651v13.427a.655.655 0 0 1-.2.482.613.613 0 0 1-.453.17zm6.861 0a.592.592 0 0 1-.651-.652v-13.4a.715.715 0 0 1 .17-.481.656.656 0 0 1 .482-.2h1.3a.677.677 0 0 1 .68.68v1.246a4.255 4.255 0 0 1 3.966-1.926h1.1a.679.679 0 0 1 .651.651v1.161a.566.566 0 0 1-.2.453.612.612 0 0 1-.453.17h-1.7a3.2 3.2 0 0 0-2.408.907 3.253 3.253 0 0 0-.879 2.408v8.328a.656.656 0 0 1-.2.482.716.716 0 0 1-.482.17zm12.234 0a.593.593 0 0 1-.651-.652v-11.814h-2.408a.592.592 0 0 1-.651-.651v-.963a.611.611 0 0 1 .17-.453.654.654 0 0 1 .481-.2h2.408v-1.417q0-4.816 4.872-4.815h1.586a.679.679 0 0 1 .652.651v.963a.656.656 0 0 1-.2.481.613.613 0 0 1-.453.17h-1.529a2.1 2.1 0 0 0-1.785.68 3.248 3.248 0 0 0-.51 2.011v1.275h6.062V863.7a.613.613 0 0 1 .17-.453.656.656 0 0 1 .482-.2h1.3a.679.679 0 0 1 .652.651v19.659a.655.655 0 0 1-.2.482.613.613 0 0 1-.454.17h-1.3a.592.592 0 0 1-.652-.652v-11.811h-6.062v11.813a.657.657 0 0 1-.2.482.614.614 0 0 1-.454.17zm20.9.283a6.487 6.487 0 0 1-4.844-1.757 6.837 6.837 0 0 1-1.813-4.674l-.029-1.218.029-1.218a6.732 6.732 0 0 1 1.841-4.646 7.389 7.389 0 0 1 9.631 0 6.736 6.736 0 0 1 1.841 4.646q.028.311.028 1.218t-.028 1.218a6.772 6.772 0 0 1-1.841 4.674 6.391 6.391 0 0 1-4.82 1.756zm0-2.181a3.582 3.582 0 0 0 2.8-1.133 4.931 4.931 0 0 0 1.133-3.258q.028-.283.028-1.076t-.028-1.076a4.931 4.931 0 0 0-1.133-3.258 3.582 3.582 0 0 0-2.8-1.133 3.671 3.671 0 0 0-2.833 1.133 4.83 4.83 0 0 0-1.1 3.258l-.028 1.076.028 1.076a4.83 4.83 0 0 0 1.1 3.258 3.671 3.671 0 0 0 2.828 1.132zm13.755 1.9a.846.846 0 0 1-.566-.17 1.321 1.321 0 0 1-.34-.538l-4.023-13.144-.056-.283a.575.575 0 0 1 .17-.425.641.641 0 0 1 .425-.17h1.246a.612.612 0 0 1 .453.17.646.646 0 0 1 .255.312l3.145 10.679 3.371-10.566a.761.761 0 0 1 .255-.4.726.726 0 0 1 .538-.2h.963a.728.728 0 0 1 .539.2.76.76 0 0 1 .255.4l3.371 10.566 3.144-10.679a.655.655 0 0 1 .2-.312.714.714 0 0 1 .482-.17h1.275a.542.542 0 0 1 .4.17.576.576 0 0 1 .17.425l-.057.283-3.994 13.144a1.323 1.323 0 0 1-.34.538.9.9 0 0 1-.6.17h-1.1a.86.86 0 0 1-.935-.708l-3.286-10.141-3.286 10.141a.928.928 0 0 1-.963.708z" fill="#51504f" data-name="Path 11" transform="translate(-1454.66 -838.62)"></path>
</g>
</g>
</g>
</svg>
</a>
</div>
<div id="content-close-button">
<svg xmlns="http://www.w3.org/2000/svg" width="19.799" height="19.799" viewBox="0 0 19.799 19.799">
<g id="Group_1574" data-name="Group 1574" transform="translate(-41.892 290.899)">
<g id="Group_1291" data-name="Group 1291" transform="rotate(-45 -308.114 -187.077)">
<rect id="Rectangle_461" width="26" height="2" fill="#51504f" data-name="Rectangle 461" rx="1" transform="translate(-.209)"></rect>
</g>
<g id="Group_1292" data-name="Group 1292" transform="rotate(45 372.48 -93.011)">
<rect id="Rectangle_462" width="26" height="2" fill="#51504f" data-name="Rectangle 462" rx="1" transform="translate(-.209 -.178)"></rect>
</g>
</g>
</svg>
</div>
</nav>
<div class="content-drawer-container" id="content-drawer">
<div class="content-drawer">
<div class="td-sidebar">
<div class="searchb-box">
<form class="search-form" action="search.html" method="get">
<input class="search-form__input" type="text" name="q" placeholder="Search docs" size="16">
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
<button class="search-form__button" type="submit">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<g id="Group_1579" data-name="Group 1579" transform="translate(-41.001 -41)">
<path id="Path_169" d="M71.415 64.687a7.215 7.215 0 1 0-6.729 6.728 7.222 7.222 0 0 0 6.729-6.728z" fill="none" data-name="Path 169" transform="translate(-14.277 -14.276)"></path>
<path id="Path_170" d="M60.863 59.8l-6.093-6.09a7.78 7.78 0 1 0-1.06 1.06l6.09 6.093a.468.468 0 0 0 .662 0l.4-.4a.468.468 0 0 0 .001-.663zM42.512 49.183a6.274 6.274 0 1 1 5.851 5.85 6.28 6.28 0 0 1-5.851-5.85z" fill="#51504f" data-name="Path 170"></path>
</g>
</svg>
</button>
</form>
</div>
<style>
.searchb-box {
margin-bottom: 26px;
}
.searchb-box .search-form {
width: 100%;
margin-top: 20px;
}
</style>
<div class="toctree" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Home</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Building the image</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#quick-start-scenarios-of-image-extending">Quick start scenarios of image extending</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#adding-new-apt-package">Adding new <code class="docutils literal notranslate"><span class="pre">apt</span></code> package</a></li>
<li class="toctree-l3"><a class="reference internal" href="#adding-a-new-pypi-package">Adding a new <code class="docutils literal notranslate"><span class="pre">PyPI</span></code> package</a></li>
<li class="toctree-l3"><a class="reference internal" href="#embedding-dags">Embedding DAGs</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#extending-vs-customizing-the-image">Extending vs. customizing the image</a></li>
<li class="toctree-l2"><a class="reference internal" href="#why-customizing-the-image">Why customizing the image ?</a></li>
<li class="toctree-l2"><a class="reference internal" href="#building-images-primer">Building images primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="#extending-the-image">Extending the image</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#base-images">Base images</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#important-notes-for-the-base-images">Important notes for the base images</a></li>
<li class="toctree-l2"><a class="reference internal" href="#examples-of-image-extending">Examples of image extending</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#example-of-customizing-airflow-provider-packages">Example of customizing Airflow Provider packages</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-of-adding-airflow-provider-package-and-apt-package">Example of adding Airflow Provider package and <code class="docutils literal notranslate"><span class="pre">apt</span></code> package</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-of-adding-apt-package">Example of adding <code class="docutils literal notranslate"><span class="pre">apt</span></code> package</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-of-adding-pypi-package">Example of adding <code class="docutils literal notranslate"><span class="pre">PyPI</span></code> package</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-when-writable-directory-is-needed">Example when writable directory is needed</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-when-you-add-packages-requiring-compilation">Example when you add packages requiring compilation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-when-you-want-to-embed-dags">Example when you want to embed DAGs</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#customizing-the-image">Customizing the image</a></li>
<li class="toctree-l2"><a class="reference internal" href="#choosing-debian-version-when-customizing-the-image">Choosing Debian version when customizing the image</a></li>
<li class="toctree-l2"><a class="reference internal" href="#using-docker-context-files">Using docker-context-files</a></li>
<li class="toctree-l2"><a class="reference internal" href="#examples-of-image-customizing">Examples of image customizing</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#building-from-pypi-packages">Building from PyPI packages</a></li>
<li class="toctree-l3"><a class="reference internal" href="#building-optimized-images">Building optimized images</a></li>
<li class="toctree-l3"><a class="reference internal" href="#building-from-github">Building from GitHub</a></li>
<li class="toctree-l3"><a class="reference internal" href="#using-custom-installation-sources">Using custom installation sources</a></li>
<li class="toctree-l3"><a class="reference internal" href="#build-images-in-security-restricted-environments">Build images in security restricted environments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#modifying-the-dockerfile">Modifying the Dockerfile</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#more-details">More details</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#build-args-reference">Build Args reference</a></li>
<li class="toctree-l3"><a class="reference internal" href="#the-architecture-of-the-images">The architecture of the images</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="entrypoint.html">Entrypoint</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Dockerfile Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="recipes.html">Recipes</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">References</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="build-arg-ref.html">Image build arguments reference</a></li>
</ul>
</div>
<style type="text/css">
.toctree {
}
.toctree li {
list-style: none;
}
.toctree .caption {
font-family: Roboto;
font-size: 18px;
font-weight: bold;
font-stretch: normal;
font-style: normal;
line-height: 1.33;
letter-spacing: normal;
color: #51504f;
padding-bottom: 13px;
text-transform: uppercase;
margin-bottom: 0;
}
.toctree .current > a:not([href="#"]) {
color: #017cee;
}
.toctree > ul {
padding-left: 0;
}
.toctree ul {
padding-left: 15px;
display: none;
}
.toctree > ul,
.toctree li.current > ul {
display: block;
}
.toctree a .toctree-expand {
display: inline-block;
position: relative;
height: 1em;
}
.toctree a .toctree-expand:before {
position: absolute;
top: 6px;
left: -12px;
content: '►';
font-size: 7px;
}
.toctree .current > a > .toctree-expand:before {
content: '▼';
}
.toctree .current {
color: #017cee;
}
.toctree li {
font-family: Roboto;
font-size: 16px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 1.63;
letter-spacing: normal;
color: #707070;
}
</style>
</div>
</div>
</div>
</div>
<div class="d-flex">
<div class="td-sidebar desktop-only d-print-none">
<div class="searchb-box">
<form class="search-form" action="search.html" method="get">
<input class="search-form__input" type="text" name="q" placeholder="Search docs" size="16">
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
<button class="search-form__button" type="submit">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<g id="Group_1579" data-name="Group 1579" transform="translate(-41.001 -41)">
<path id="Path_169" d="M71.415 64.687a7.215 7.215 0 1 0-6.729 6.728 7.222 7.222 0 0 0 6.729-6.728z" fill="none" data-name="Path 169" transform="translate(-14.277 -14.276)"></path>
<path id="Path_170" d="M60.863 59.8l-6.093-6.09a7.78 7.78 0 1 0-1.06 1.06l6.09 6.093a.468.468 0 0 0 .662 0l.4-.4a.468.468 0 0 0 .001-.663zM42.512 49.183a6.274 6.274 0 1 1 5.851 5.85 6.28 6.28 0 0 1-5.851-5.85z" fill="#51504f" data-name="Path 170"></path>
</g>
</svg>
</button>
</form>
</div>
<style>
.searchb-box {
margin-bottom: 26px;
}
.searchb-box .search-form {
width: 100%;
margin-top: 20px;
}
</style>
<div class="toctree" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Home</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Building the image</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#quick-start-scenarios-of-image-extending">Quick start scenarios of image extending</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#adding-new-apt-package">Adding new <code class="docutils literal notranslate"><span class="pre">apt</span></code> package</a></li>
<li class="toctree-l3"><a class="reference internal" href="#adding-a-new-pypi-package">Adding a new <code class="docutils literal notranslate"><span class="pre">PyPI</span></code> package</a></li>
<li class="toctree-l3"><a class="reference internal" href="#embedding-dags">Embedding DAGs</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#extending-vs-customizing-the-image">Extending vs. customizing the image</a></li>
<li class="toctree-l2"><a class="reference internal" href="#why-customizing-the-image">Why customizing the image ?</a></li>
<li class="toctree-l2"><a class="reference internal" href="#building-images-primer">Building images primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="#extending-the-image">Extending the image</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#base-images">Base images</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#important-notes-for-the-base-images">Important notes for the base images</a></li>
<li class="toctree-l2"><a class="reference internal" href="#examples-of-image-extending">Examples of image extending</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#example-of-customizing-airflow-provider-packages">Example of customizing Airflow Provider packages</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-of-adding-airflow-provider-package-and-apt-package">Example of adding Airflow Provider package and <code class="docutils literal notranslate"><span class="pre">apt</span></code> package</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-of-adding-apt-package">Example of adding <code class="docutils literal notranslate"><span class="pre">apt</span></code> package</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-of-adding-pypi-package">Example of adding <code class="docutils literal notranslate"><span class="pre">PyPI</span></code> package</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-when-writable-directory-is-needed">Example when writable directory is needed</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-when-you-add-packages-requiring-compilation">Example when you add packages requiring compilation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-when-you-want-to-embed-dags">Example when you want to embed DAGs</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#customizing-the-image">Customizing the image</a></li>
<li class="toctree-l2"><a class="reference internal" href="#choosing-debian-version-when-customizing-the-image">Choosing Debian version when customizing the image</a></li>
<li class="toctree-l2"><a class="reference internal" href="#using-docker-context-files">Using docker-context-files</a></li>
<li class="toctree-l2"><a class="reference internal" href="#examples-of-image-customizing">Examples of image customizing</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#building-from-pypi-packages">Building from PyPI packages</a></li>
<li class="toctree-l3"><a class="reference internal" href="#building-optimized-images">Building optimized images</a></li>
<li class="toctree-l3"><a class="reference internal" href="#building-from-github">Building from GitHub</a></li>
<li class="toctree-l3"><a class="reference internal" href="#using-custom-installation-sources">Using custom installation sources</a></li>
<li class="toctree-l3"><a class="reference internal" href="#build-images-in-security-restricted-environments">Build images in security restricted environments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#modifying-the-dockerfile">Modifying the Dockerfile</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#more-details">More details</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#build-args-reference">Build Args reference</a></li>
<li class="toctree-l3"><a class="reference internal" href="#the-architecture-of-the-images">The architecture of the images</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="entrypoint.html">Entrypoint</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Dockerfile Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="recipes.html">Recipes</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">References</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="build-arg-ref.html">Image build arguments reference</a></li>
</ul>
</div>
<style type="text/css">
.toctree {
}
.toctree li {
list-style: none;
}
.toctree .caption {
font-family: Roboto;
font-size: 18px;
font-weight: bold;
font-stretch: normal;
font-style: normal;
line-height: 1.33;
letter-spacing: normal;
color: #51504f;
padding-bottom: 13px;
text-transform: uppercase;
margin-bottom: 0;
}
.toctree .current > a:not([href="#"]) {
color: #017cee;
}
.toctree > ul {
padding-left: 0;
}
.toctree ul {
padding-left: 15px;
display: none;
}
.toctree > ul,
.toctree li.current > ul {
display: block;
}
.toctree a .toctree-expand {
display: inline-block;
position: relative;
height: 1em;
}
.toctree a .toctree-expand:before {
position: absolute;
top: 6px;
left: -12px;
content: '►';
font-size: 7px;
}
.toctree .current > a > .toctree-expand:before {
content: '▼';
}
.toctree .current {
color: #017cee;
}
.toctree li {
font-family: Roboto;
font-size: 16px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 1.63;
letter-spacing: normal;
color: #707070;
}
</style>
</div>
<main class="col-12 col-md-9 col-xl-8" role="main">
<div role="navigation" aria-label="breadcrumbs navigation" class="d-none d-md-block d-print-none">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="index.html" class="icon icon-home"> Home</a></li>
<li class="breadcrumb-item"><a href="build.html"> Building the image</a></li>
</ul>
</div>
<div class="rst-content">
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<blockquote>
<div></div></blockquote>
<div class="section" id="building-the-image">
<span id="build-build-image"></span><h1>Building the image<a class="headerlink" href="#building-the-image" title="Permalink to this heading"></a></h1>
<p>Before you dive-deeply in the way how the Airflow Image is built, let us first explain why you might need
to build the custom container image and we show a few typical ways you can do it.</p>
<div class="section" id="quick-start-scenarios-of-image-extending">
<h2>Quick start scenarios of image extending<a class="headerlink" href="#quick-start-scenarios-of-image-extending" title="Permalink to this heading"></a></h2>
<p>The most common scenarios where you want to build your own image are adding a new <code class="docutils literal notranslate"><span class="pre">apt</span></code> package,
adding a new <code class="docutils literal notranslate"><span class="pre">PyPI</span></code> dependency and embedding DAGs into the image.
Example Dockerfiles for those scenarios are below, and you can read further
for more complex cases which might involve either extending or customizing the image. You will find
more information about more complex scenarios below, but if your goal is to quickly extend the Airflow
image with new provider, package, etc. then here is a quick start for you.</p>
<div class="section" id="adding-new-apt-package">
<h3>Adding new <code class="docutils literal notranslate"><span class="pre">apt</span></code> package<a class="headerlink" href="#adding-new-apt-package" title="Permalink to this heading"></a></h3>
<p>The following example adds <code class="docutils literal notranslate"><span class="pre">vim</span></code> to the Airflow image. When adding packages via <code class="docutils literal notranslate"><span class="pre">apt</span></code> you should
switch to the <code class="docutils literal notranslate"><span class="pre">root</span></code> user when running the <code class="docutils literal notranslate"><span class="pre">apt</span></code> commands, but do not forget to switch back to the
<code class="docutils literal notranslate"><span class="pre">airflow</span></code> user after installation is complete.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/extending/add-apt-packages/Dockerfile</span></p>
<div class="highlight-Dockerfile notranslate"><div class="highlight"><pre><span></span><span class="k">FROM</span><span class="w"> </span><span class="s">apache/airflow:2.3.3</span>
<span class="k">USER</span><span class="w"> </span><span class="s">root</span>
<span class="k">RUN</span><span class="w"> </span>apt-get update <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get install -y --no-install-recommends <span class="se">\</span>
vim <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get autoremove -yqq --purge <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get clean <span class="se">\</span>
<span class="o">&amp;&amp;</span> rm -rf /var/lib/apt/lists/*
<span class="k">USER</span><span class="w"> </span><span class="s">airflow</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="adding-a-new-pypi-package">
<h3>Adding a new <code class="docutils literal notranslate"><span class="pre">PyPI</span></code> package<a class="headerlink" href="#adding-a-new-pypi-package" title="Permalink to this heading"></a></h3>
<p>The following example adds <code class="docutils literal notranslate"><span class="pre">lxml</span></code> python package from PyPI to the image. When adding packages via
<code class="docutils literal notranslate"><span class="pre">pip</span></code> you need to use the <code class="docutils literal notranslate"><span class="pre">airflow</span></code> user rather than <code class="docutils literal notranslate"><span class="pre">root</span></code>. Attempts to install <code class="docutils literal notranslate"><span class="pre">pip</span></code> packages
as <code class="docutils literal notranslate"><span class="pre">root</span></code> will fail with an appropriate error message.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/extending/add-pypi-packages/Dockerfile</span></p>
<div class="highlight-Dockerfile notranslate"><div class="highlight"><pre><span></span><span class="k">FROM</span><span class="w"> </span><span class="s">apache/airflow:2.3.3</span>
<span class="k">RUN</span><span class="w"> </span>pip install --no-cache-dir lxml
</pre></div>
</div>
</div>
</div>
<div class="section" id="embedding-dags">
<h3>Embedding DAGs<a class="headerlink" href="#embedding-dags" title="Permalink to this heading"></a></h3>
<p>The following example adds <code class="docutils literal notranslate"><span class="pre">test_dag.py</span></code> to your image in the <code class="docutils literal notranslate"><span class="pre">/opt/airflow/dags</span></code> folder.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/extending/embedding-dags/Dockerfile</span></p>
<div class="highlight-Dockerfile notranslate"><div class="highlight"><pre><span></span><span class="k">FROM</span><span class="w"> </span><span class="s">apache/airflow:2.3.3</span>
<span class="k">COPY</span><span class="w"> </span>--chown<span class="o">=</span>airflow:root test_dag.py /opt/airflow/dags
</pre></div>
</div>
</div>
<div class="example-block-wrapper docutils container">
<p class="example-header example-header--with-button"><span class="example-title">docs/docker-stack/docker-examples/extending/embedding-dags/test_dag.py</span><a class="example-header-button viewcode-button reference internal" href="_modules/docs/docker-stack/docker-examples/extending/embedding-dags/test_dag.html"><span class="viewcode-link">[source]</span></a></p>
<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="sd">&quot;&quot;&quot;This dag only runs some simple tasks to test Airflow&#39;s task execution.&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">datetime</span>
<span class="kn">import</span> <span class="nn">pendulum</span>
<span class="kn">from</span> <span class="nn">airflow.models.dag</span> <span class="kn">import</span> <span class="n">DAG</span>
<span class="kn">from</span> <span class="nn">airflow.operators.empty</span> <span class="kn">import</span> <span class="n">EmptyOperator</span>
<span class="n">now</span> <span class="o">=</span> <span class="n">pendulum</span><span class="o">.</span><span class="n">now</span><span class="p">(</span><span class="n">tz</span><span class="o">=</span><span class="s2">&quot;UTC&quot;</span><span class="p">)</span>
<span class="n">now_to_the_hour</span> <span class="o">=</span> <span class="p">(</span><span class="n">now</span> <span class="o">-</span> <span class="n">datetime</span><span class="o">.</span><span class="n">timedelta</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">minute</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">second</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">microsecond</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
<span class="n">START_DATE</span> <span class="o">=</span> <span class="n">now_to_the_hour</span>
<span class="n">DAG_NAME</span> <span class="o">=</span> <span class="s1">&#39;test_dag_v1&#39;</span>
<span class="n">dag</span> <span class="o">=</span> <span class="n">DAG</span><span class="p">(</span>
<span class="n">DAG_NAME</span><span class="p">,</span>
<span class="n">schedule_interval</span><span class="o">=</span><span class="s1">&#39;*/10 * * * *&#39;</span><span class="p">,</span>
<span class="n">default_args</span><span class="o">=</span><span class="p">{</span><span class="s1">&#39;depends_on_past&#39;</span><span class="p">:</span> <span class="kc">True</span><span class="p">},</span>
<span class="n">start_date</span><span class="o">=</span><span class="n">pendulum</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2021</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">tz</span><span class="o">=</span><span class="s2">&quot;UTC&quot;</span><span class="p">),</span>
<span class="n">catchup</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">run_this_1</span> <span class="o">=</span> <span class="n">EmptyOperator</span><span class="p">(</span><span class="n">task_id</span><span class="o">=</span><span class="s1">&#39;run_this_1&#39;</span><span class="p">,</span> <span class="n">dag</span><span class="o">=</span><span class="n">dag</span><span class="p">)</span>
<span class="n">run_this_2</span> <span class="o">=</span> <span class="n">EmptyOperator</span><span class="p">(</span><span class="n">task_id</span><span class="o">=</span><span class="s1">&#39;run_this_2&#39;</span><span class="p">,</span> <span class="n">dag</span><span class="o">=</span><span class="n">dag</span><span class="p">)</span>
<span class="n">run_this_2</span><span class="o">.</span><span class="n">set_upstream</span><span class="p">(</span><span class="n">run_this_1</span><span class="p">)</span>
<span class="n">run_this_3</span> <span class="o">=</span> <span class="n">EmptyOperator</span><span class="p">(</span><span class="n">task_id</span><span class="o">=</span><span class="s1">&#39;run_this_3&#39;</span><span class="p">,</span> <span class="n">dag</span><span class="o">=</span><span class="n">dag</span><span class="p">)</span>
<span class="n">run_this_3</span><span class="o">.</span><span class="n">set_upstream</span><span class="p">(</span><span class="n">run_this_2</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="extending-vs-customizing-the-image">
<h2>Extending vs. customizing the image<a class="headerlink" href="#extending-vs-customizing-the-image" title="Permalink to this heading"></a></h2>
<p>You might want to know very quickly whether you need to extend or customize the existing image
for Apache Airflow. This chapter gives you a short answer to those questions.</p>
<p>Here is the comparison of the two approaches:</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 68%" />
<col style="width: 14%" />
<col style="width: 17%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"></th>
<th class="head"><p>Extending</p></th>
<th class="head"><p>Customizing</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>Uses familiar ‘FROM’ pattern of image building</p></td>
<td><p>Yes</p></td>
<td><p>No</p></td>
</tr>
<tr class="row-odd"><td><p>Requires only basic knowledge about images</p></td>
<td><p>Yes</p></td>
<td><p>No</p></td>
</tr>
<tr class="row-even"><td><p>Builds quickly</p></td>
<td><p>Yes</p></td>
<td><p>No</p></td>
</tr>
<tr class="row-odd"><td><p>Produces image heavily optimized for size</p></td>
<td><p>No</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="row-even"><td><p>Can build from custom airflow sources (forks)</p></td>
<td><p>No</p></td>
<td><p>Yes</p></td>
</tr>
<tr class="row-odd"><td><p>Can build on air-gaped system</p></td>
<td><p>No</p></td>
<td><p>Yes</p></td>
</tr>
</tbody>
</table>
<p>TL;DR; If you have a need to build custom image, it is easier to start with “Extending”. However, if your
dependencies require compilation steps or when your require to build the image from security vetted
packages, switching to “Customizing” the image provides much more optimized images. For example,
if we compare equivalent images built by “Extending” and “Customization”, they end up being
1.1GB and 874MB respectively - a 20% improvement in size for the Customized image.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You can also combine both - customizing &amp; extending the image in one. You can build your
optimized base image first using <code class="docutils literal notranslate"><span class="pre">customization</span></code> method (for example by your admin team) with all
the heavy compilation required dependencies and you can publish it in your registry and let others
<code class="docutils literal notranslate"><span class="pre">extend</span></code> your image using <code class="docutils literal notranslate"><span class="pre">FROM</span></code> and add their own lightweight dependencies. This reflects well
the split where typically “Casual” users will Extend the image and “Power-users” will customize it.</p>
</div>
<p>Airflow Summit 2020’s <a class="reference external" href="https://youtu.be/wDr3Y7q2XoI">Production Docker Image</a> talk provides more
details about the context, architecture and customization/extension methods for the Production Image.</p>
</div>
<div class="section" id="why-customizing-the-image">
<h2>Why customizing the image ?<a class="headerlink" href="#why-customizing-the-image" title="Permalink to this heading"></a></h2>
<p>The Apache Airflow community, releases Docker Images which are <code class="docutils literal notranslate"><span class="pre">reference</span> <span class="pre">images</span></code> for Apache Airflow.
However, Airflow has more than 60 community managed providers (installable via extras) and some of the
default extras/providers installed are not used by everyone, sometimes others extras/providers
are needed, sometimes (very often actually) you need to add your own custom dependencies,
packages or even custom providers.</p>
<p>In Kubernetes and Docker terms this means that you need another image with your specific requirements.
This is why you should learn how to build your own Docker (or more properly Container) image.
You might be tempted to use the <code class="docutils literal notranslate"><span class="pre">reference</span> <span class="pre">image</span></code> and dynamically install the new packages while
starting your containers, but this is a bad idea for multiple reasons - starting from fragility of the build
and ending with the extra time needed to install those packages - which has to happen every time every
container starts. The only viable way to deal with new dependencies and requirements in production is to
build and use your own image. You should only use installing dependencies dynamically in case of
“hobbyist” and “quick start” scenarios when you want to iterate quickly to try things out and later
replace it with your own images.</p>
</div>
<div class="section" id="building-images-primer">
<h2>Building images primer<a class="headerlink" href="#building-images-primer" title="Permalink to this heading"></a></h2>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> does not strictly follow the <a class="reference external" href="https://semver.org/">SemVer</a> approach of
Apache Airflow when it comes to features and backwards compatibility. While Airflow code strictly
follows it, the <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> is really a way to conveniently package Airflow using standard container
approach, occasionally there are some changes in the building process or in the entrypoint of the image
that require slight adaptation. Details of changes and adaptation needed can be found in the
<a class="reference internal" href="changelog.html"><span class="doc">Changelog</span></a>.</p>
</div>
<p>There are several most-typical scenarios that you will encounter and here is a quick recipe on how to achieve
your goal quickly. In order to understand details you can read further, but for the simple cases using
typical tools here are the simple examples.</p>
<p>In the simplest case building your image consists of those steps:</p>
<ol class="arabic simple">
<li><p>Create your own <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> (name it <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code>) where you add:</p></li>
</ol>
<ul class="simple">
<li><p>information what your image should be based on (for example <code class="docutils literal notranslate"><span class="pre">FROM:</span> <span class="pre">apache/airflow:|airflow-version|-python3.8</span></code></p></li>
<li><p>additional steps that should be executed in your image (typically in the form of <code class="docutils literal notranslate"><span class="pre">RUN</span> <span class="pre">&lt;command&gt;</span></code>)</p></li>
</ul>
<ol class="arabic simple" start="2">
<li><p>Build your image. This can be done with <code class="docutils literal notranslate"><span class="pre">docker</span></code> CLI tools and examples below assume <code class="docutils literal notranslate"><span class="pre">docker</span></code> is used.
There are other tools like <code class="docutils literal notranslate"><span class="pre">kaniko</span></code> or <code class="docutils literal notranslate"><span class="pre">podman</span></code> that allow you to build the image, but <code class="docutils literal notranslate"><span class="pre">docker</span></code> is
so far the most popular and developer-friendly tool out there. Typical way of building the image looks
like follows (<code class="docutils literal notranslate"><span class="pre">my-image:0.0.1</span></code> is the custom tag of your image containing version).
In case you use some kind of registry where you will be using the image from, it is usually named
in the form of <code class="docutils literal notranslate"><span class="pre">registry/image-name</span></code>. The name of the image has to be configured for the deployment
method your image will be deployed. This can be set for example as image name in the
<a class="reference external" href="running-airflow-in-docker">docker-compose file</a> or in the <a class="reference external" href="helm-chart">Helm chart</a>.</p></li>
</ol>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>docker build . -f Dockerfile --pull --tag my-image:0.0.1
</pre></div>
</div>
<ol class="arabic simple" start="3">
<li><p>[Optional] Test the image. Airflow contains tool that allows you to test the image. This step however,
requires locally checked out or extracted Airflow sources. If you happen to have the sources you can
test the image by running this command (in airflow root folder). The output will tell you if the image
is “good-to-go”.</p></li>
</ol>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>./scripts/ci/tools/verify_docker_image.sh PROD my-image:0.0.1
</pre></div>
</div>
<ol class="arabic simple" start="4">
<li><p>Once you build the image locally you have usually several options to make them available for your deployment:</p></li>
</ol>
<ul class="simple">
<li><p>For <code class="docutils literal notranslate"><span class="pre">docker-compose</span></code> deployment, if you’ve already built your image, and want to continue
building the image manually when needed with <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">build</span></code>, you can edit the
docker-compose.yaml and replace the “apache/airflow:&lt;version&gt;” image with the
image you’ve just built <code class="docutils literal notranslate"><span class="pre">my-image:0.0.1</span></code> - it will be used from your local Docker
Engine cache. You can also simply set <code class="docutils literal notranslate"><span class="pre">AIRFLOW_IMAGE_NAME</span></code> variable to
point to your image and <code class="docutils literal notranslate"><span class="pre">docker-compose</span></code> will use it automatically without having
to modify the file.</p></li>
<li><p>Also for <code class="docutils literal notranslate"><span class="pre">docker-compose</span></code> deployment, you can delegate image building to the docker-compose.
To do that - open your <code class="docutils literal notranslate"><span class="pre">docker-compose.yaml</span></code> file and search for the phrase “In order to add custom dependencies”.
Follow these instructions of commenting the “image” line and uncommenting the “build” line.
This is a standard docker-compose feature and you can read about it in
<a class="reference external" href="https://docs.docker.com/compose/reference/build/">Docker Compose build reference</a>.
Run <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">build</span></code> to build the images. Similarly as in the previous case, the
image is stored in Docker engine cache and Docker Compose will use it from there.
The <code class="docutils literal notranslate"><span class="pre">docker-compose</span> <span class="pre">build</span></code> command uses the same <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">build</span></code> command that
you can run manually under-the-hood.</p></li>
<li><p>For some - development targeted - Kubernetes deployments you can load the images directly to
Kubernetes clusters. Clusters such as <code class="docutils literal notranslate"><span class="pre">kind</span></code> or <code class="docutils literal notranslate"><span class="pre">minikube</span></code> have dedicated <code class="docutils literal notranslate"><span class="pre">load</span></code> method to load the
images to the cluster.</p></li>
<li><p>Last but not least - you can push your image to a remote registry which is the most common way
of storing and exposing the images, and it is most portable way of publishing the image. Both
Docker-Compose and Kubernetes can make use of images exposed via registries.</p></li>
</ul>
</div>
<div class="section" id="extending-the-image">
<h2>Extending the image<a class="headerlink" href="#extending-the-image" title="Permalink to this heading"></a></h2>
<p>Extending the image is easiest if you just need to add some dependencies that do not require
compiling. The compilation framework of Linux (so called <code class="docutils literal notranslate"><span class="pre">build-essential</span></code>) is pretty big, and
for the production images, size is really important factor to optimize for, so our Production Image
does not contain <code class="docutils literal notranslate"><span class="pre">build-essential</span></code>. If you need a compiler like gcc or g++ or make/cmake etc. - those
are not found in the image and it is recommended that you follow the “customize” route instead.</p>
<p>How to extend the image - it is something you are most likely familiar with - simply
build a new image using Dockerfile’s <code class="docutils literal notranslate"><span class="pre">FROM</span></code> directive and add whatever you need. Then you can add your
Debian dependencies with <code class="docutils literal notranslate"><span class="pre">apt</span></code> or PyPI dependencies with <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> or any other stuff you need.</p>
<div class="section" id="base-images">
<h3>Base images<a class="headerlink" href="#base-images" title="Permalink to this heading"></a></h3>
<p>There are two types of images you can extend your image from:</p>
<ol class="arabic simple">
<li><p>Regular Airflow image that contains the most common extras and providers, and all supported backend
database clients for AMD64 platform and Postgres for ARM64 platform.</p></li>
<li><p>Slim Airflow image, which is a minimal image, contains all supported backends database clients installed
for AMD64 platform and Postgres for ARM64 platform, but contains no extras or providers, except
the 4 default providers.</p></li>
</ol>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Differences of slim image vs. regular image.</p>
<p>The slim image is small comparing to regular image (~500 MB vs ~1.1GB) and you might need to add a
lot more packages and providers in order to make it useful for your case (but if you use only a
small subset of providers, it might be a good starting point for you).</p>
<p>The slim images might have dependencies in different versions than those used when providers are
preinstalled, simply because core Airflow might have less limits on the versions on its own.
When you install some providers they might require downgrading some dependencies if the providers
require different limits for the same dependencies.</p>
</div>
<p>Naming conventions for the images:</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 15%" />
<col style="width: 17%" />
<col style="width: 31%" />
<col style="width: 36%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Image</p></th>
<th class="head"><p>Python</p></th>
<th class="head"><p>Standard image</p></th>
<th class="head"><p>Slim image</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>Latest default
Default
Latest
Specific</p></td>
<td><p>3.7
3.7
3.7,3.8,3.9,3.10
3.7,3.8,3.9,3.10</p></td>
<td><p>apache/airflow:latest
apache/airflow:X.Y.Z
apache/airflow:latest-pythonN.M
apache/airflow:X.Y.Z-pythonN.M</p></td>
<td><p>apache/airflow:slim-latest
apache/airflow:slim-X.Y.Z
apache/airflow:slim-latest-pythonN.M
apache/airflow:slim-X.Y.Z-pythonN.M</p></td>
</tr>
</tbody>
</table>
<ul class="simple">
<li><p>The “latest” image is always the latest released stable version available.</p></li>
</ul>
</div>
</div>
<div class="section" id="important-notes-for-the-base-images">
<h2>Important notes for the base images<a class="headerlink" href="#important-notes-for-the-base-images" title="Permalink to this heading"></a></h2>
<p>You should be aware, about a few things:</p>
<ul class="simple">
<li><p>The production image of airflow uses “airflow” user, so if you want to add some of the tools
as <code class="docutils literal notranslate"><span class="pre">root</span></code> user, you need to switch to it with <code class="docutils literal notranslate"><span class="pre">USER</span></code> directive of the Dockerfile and switch back to
<code class="docutils literal notranslate"><span class="pre">airflow</span></code> user when you are done. Also you should remember about following the
<a class="reference external" href="https://docs.docker.com/develop/develop-images/dockerfile_best-practices/">best practices of Dockerfiles</a>
to make sure your image is lean and small.</p></li>
<li><p>The PyPI dependencies in Apache Airflow are installed in the user library, of the “airflow” user, so
PIP packages are installed to <code class="docutils literal notranslate"><span class="pre">~/.local</span></code> folder as if the <code class="docutils literal notranslate"><span class="pre">--user</span></code> flag was specified when running PIP.
Note also that using <code class="docutils literal notranslate"><span class="pre">--no-cache-dir</span></code> is a good idea that can help to make your image smaller.</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Only as of <code class="docutils literal notranslate"><span class="pre">2.0.1</span></code> image the <code class="docutils literal notranslate"><span class="pre">--user</span></code> flag is turned on by default by setting <code class="docutils literal notranslate"><span class="pre">PIP_USER</span></code> environment
variable to <code class="docutils literal notranslate"><span class="pre">true</span></code>. This can be disabled by un-setting the variable or by setting it to <code class="docutils literal notranslate"><span class="pre">false</span></code>. In the
2.0.0 image you had to add the <code class="docutils literal notranslate"><span class="pre">--user</span></code> flag as <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">--user</span></code> command.</p>
</div>
<ul class="simple">
<li><p>If your apt, or PyPI dependencies require some of the <code class="docutils literal notranslate"><span class="pre">build-essential</span></code> or other packages that need
to compile your python dependencies, then your best choice is to follow the “Customize the image” route,
because you can build a highly-optimized (for size) image this way. However it requires you to use
the Dockerfile that is released as part of Apache Airflow sources (also available at
<a class="reference external" href="https://github.com/apache/airflow/blob/main/Dockerfile">Dockerfile</a>)</p></li>
<li><p>You can also embed your dags in the image by simply adding them with COPY directive of Airflow.
The DAGs in production image are in <code class="docutils literal notranslate"><span class="pre">/opt/airflow/dags</span></code> folder.</p></li>
<li><p>You can build your image without any need for Airflow sources. It is enough that you place the
<code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> and any files that are referred to (such as Dag files) in a separate directory and run
a command <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">build</span> <span class="pre">.</span> <span class="pre">--pull</span> <span class="pre">--tag</span> <span class="pre">my-image:my-tag</span></code> (where <code class="docutils literal notranslate"><span class="pre">my-image</span></code> is the name you want to name it
and <code class="docutils literal notranslate"><span class="pre">my-tag</span></code> is the tag you want to tag the image with.</p></li>
<li><p>If your way of extending image requires to create writable directories, you MUST remember about adding
<code class="docutils literal notranslate"><span class="pre">umask</span> <span class="pre">0002</span></code> step in your RUN command. This is necessary in order to accommodate our approach for
running the image with an arbitrary user. Such user will always run with <code class="docutils literal notranslate"><span class="pre">GID=0</span></code> -
the entrypoint will prevent non-root GIDs. You can read more about it in
<a class="reference internal" href="entrypoint.html#arbitrary-docker-user"><span class="std std-ref">arbitrary docker user</span></a> documentation for the entrypoint. The
<code class="docutils literal notranslate"><span class="pre">umask</span> <span class="pre">0002</span></code> is set as default when you enter the image, so any directories you create by default
in runtime, will have <code class="docutils literal notranslate"><span class="pre">GID=0</span></code> and will be group-writable.</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>When you build image for Airflow version &lt; <code class="docutils literal notranslate"><span class="pre">2.1</span></code> (for example 2.0.2 or 1.10.15) the image is built with
PIP 20.2.4 because <code class="docutils literal notranslate"><span class="pre">PIP21+</span></code> is only supported for <code class="docutils literal notranslate"><span class="pre">Airflow</span> <span class="pre">2.1+</span></code></p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Only as of <code class="docutils literal notranslate"><span class="pre">2.0.2</span></code> the default group of <code class="docutils literal notranslate"><span class="pre">airflow</span></code> user is <code class="docutils literal notranslate"><span class="pre">root</span></code>. Previously it was <code class="docutils literal notranslate"><span class="pre">airflow</span></code>,
so if you are building your images based on an earlier image, you need to manually change the default
group for airflow user:</p>
</div>
<div class="highlight-docker notranslate"><div class="highlight"><pre><span></span><span class="k">RUN</span><span class="w"> </span>usermod -g <span class="m">0</span> airflow
</pre></div>
</div>
</div>
<div class="section" id="examples-of-image-extending">
<h2>Examples of image extending<a class="headerlink" href="#examples-of-image-extending" title="Permalink to this heading"></a></h2>
<div class="section" id="example-of-customizing-airflow-provider-packages">
<h3>Example of customizing Airflow Provider packages<a class="headerlink" href="#example-of-customizing-airflow-provider-packages" title="Permalink to this heading"></a></h3>
<p>The <a class="reference external" href="/docs/apache-airflow-providers/index.html#providers-community-maintained-providers" title="(in apache-airflow-providers vdevel)"><span class="xref std std-ref">Airflow Providers</span></a> are released independently of core
Airflow and sometimes you might want to upgrade specific providers only to fix some problems or
use features available in that provider version. Here is an example of how you can do it</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/extending/custom-providers/Dockerfile</span></p>
<div class="highlight-Dockerfile notranslate"><div class="highlight"><pre><span></span><span class="k">FROM</span><span class="w"> </span><span class="s">apache/airflow:2.3.3</span>
<span class="k">RUN</span><span class="w"> </span>pip install --no-cache-dir apache-airflow-providers-docker<span class="o">==</span><span class="m">2</span>.5.1
</pre></div>
</div>
</div>
</div>
<div class="section" id="example-of-adding-airflow-provider-package-and-apt-package">
<h3>Example of adding Airflow Provider package and <code class="docutils literal notranslate"><span class="pre">apt</span></code> package<a class="headerlink" href="#example-of-adding-airflow-provider-package-and-apt-package" title="Permalink to this heading"></a></h3>
<p>The following example adds <code class="docutils literal notranslate"><span class="pre">apache-spark</span></code> airflow-providers which requires both <code class="docutils literal notranslate"><span class="pre">java</span></code> and
python package from PyPI.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/extending/add-providers/Dockerfile</span></p>
<div class="highlight-Dockerfile notranslate"><div class="highlight"><pre><span></span><span class="k">FROM</span><span class="w"> </span><span class="s">apache/airflow:2.3.3</span>
<span class="k">USER</span><span class="w"> </span><span class="s">root</span>
<span class="k">RUN</span><span class="w"> </span>apt-get update <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get install -y --no-install-recommends <span class="se">\</span>
openjdk-11-jre-headless <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get autoremove -yqq --purge <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get clean <span class="se">\</span>
<span class="o">&amp;&amp;</span> rm -rf /var/lib/apt/lists/*
<span class="k">USER</span><span class="w"> </span><span class="s">airflow</span>
<span class="k">ENV</span><span class="w"> </span><span class="nv">JAVA_HOME</span><span class="o">=</span>/usr/lib/jvm/java-11-openjdk-amd64
<span class="k">RUN</span><span class="w"> </span>pip install --no-cache-dir apache-airflow-providers-apache-spark<span class="o">==</span><span class="m">2</span>.1.3
</pre></div>
</div>
</div>
</div>
<div class="section" id="example-of-adding-apt-package">
<h3>Example of adding <code class="docutils literal notranslate"><span class="pre">apt</span></code> package<a class="headerlink" href="#example-of-adding-apt-package" title="Permalink to this heading"></a></h3>
<p>The following example adds <code class="docutils literal notranslate"><span class="pre">vim</span></code> to the airflow image.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/extending/add-apt-packages/Dockerfile</span></p>
<div class="highlight-Dockerfile notranslate"><div class="highlight"><pre><span></span><span class="k">FROM</span><span class="w"> </span><span class="s">apache/airflow:2.3.3</span>
<span class="k">USER</span><span class="w"> </span><span class="s">root</span>
<span class="k">RUN</span><span class="w"> </span>apt-get update <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get install -y --no-install-recommends <span class="se">\</span>
vim <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get autoremove -yqq --purge <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get clean <span class="se">\</span>
<span class="o">&amp;&amp;</span> rm -rf /var/lib/apt/lists/*
<span class="k">USER</span><span class="w"> </span><span class="s">airflow</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="example-of-adding-pypi-package">
<h3>Example of adding <code class="docutils literal notranslate"><span class="pre">PyPI</span></code> package<a class="headerlink" href="#example-of-adding-pypi-package" title="Permalink to this heading"></a></h3>
<p>The following example adds <code class="docutils literal notranslate"><span class="pre">lxml</span></code> python package from PyPI to the image.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/extending/add-pypi-packages/Dockerfile</span></p>
<div class="highlight-Dockerfile notranslate"><div class="highlight"><pre><span></span><span class="k">FROM</span><span class="w"> </span><span class="s">apache/airflow:2.3.3</span>
<span class="k">RUN</span><span class="w"> </span>pip install --no-cache-dir lxml
</pre></div>
</div>
</div>
</div>
<div class="section" id="example-when-writable-directory-is-needed">
<h3>Example when writable directory is needed<a class="headerlink" href="#example-when-writable-directory-is-needed" title="Permalink to this heading"></a></h3>
<p>The following example adds a new directory that is supposed to be writable for any arbitrary user
running the container.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/extending/writable-directory/Dockerfile</span></p>
<div class="highlight-Dockerfile notranslate"><div class="highlight"><pre><span></span><span class="k">FROM</span><span class="w"> </span><span class="s">apache/airflow:2.3.3</span>
<span class="k">RUN</span><span class="w"> </span><span class="nb">umask</span> <span class="m">0002</span><span class="p">;</span> <span class="se">\</span>
mkdir -p ~/writeable-directory
</pre></div>
</div>
</div>
</div>
<div class="section" id="example-when-you-add-packages-requiring-compilation">
<h3>Example when you add packages requiring compilation<a class="headerlink" href="#example-when-you-add-packages-requiring-compilation" title="Permalink to this heading"></a></h3>
<p>The following example adds <code class="docutils literal notranslate"><span class="pre">mpi4py</span></code> package which requires both <code class="docutils literal notranslate"><span class="pre">build-essential</span></code> and <code class="docutils literal notranslate"><span class="pre">mpi</span> <span class="pre">compiler</span></code>.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/extending/add-build-essential-extend/Dockerfile</span></p>
<div class="highlight-Dockerfile notranslate"><div class="highlight"><pre><span></span><span class="k">FROM</span><span class="w"> </span><span class="s">apache/airflow:2.3.3</span>
<span class="k">USER</span><span class="w"> </span><span class="s">root</span>
<span class="k">RUN</span><span class="w"> </span>apt-get update <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get install -y --no-install-recommends <span class="se">\</span>
build-essential libopenmpi-dev <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get autoremove -yqq --purge <span class="se">\</span>
<span class="o">&amp;&amp;</span> apt-get clean <span class="se">\</span>
<span class="o">&amp;&amp;</span> rm -rf /var/lib/apt/lists/*
<span class="k">USER</span><span class="w"> </span><span class="s">airflow</span>
<span class="k">RUN</span><span class="w"> </span>pip install --no-cache-dir mpi4py
</pre></div>
</div>
</div>
<p>The size of this image is ~ 1.1 GB when build. As you will see further, you can achieve 20% reduction in
size of the image in case you use “Customizing” rather than “Extending” the image.</p>
</div>
<div class="section" id="example-when-you-want-to-embed-dags">
<h3>Example when you want to embed DAGs<a class="headerlink" href="#example-when-you-want-to-embed-dags" title="Permalink to this heading"></a></h3>
<p>The following example adds <code class="docutils literal notranslate"><span class="pre">test_dag.py</span></code> to your image in the <code class="docutils literal notranslate"><span class="pre">/opt/airflow/dags</span></code> folder.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/extending/embedding-dags/Dockerfile</span></p>
<div class="highlight-Dockerfile notranslate"><div class="highlight"><pre><span></span><span class="k">FROM</span><span class="w"> </span><span class="s">apache/airflow:2.3.3</span>
<span class="k">COPY</span><span class="w"> </span>--chown<span class="o">=</span>airflow:root test_dag.py /opt/airflow/dags
</pre></div>
</div>
</div>
<div class="example-block-wrapper docutils container">
<p class="example-header example-header--with-button"><span class="example-title">docs/docker-stack/docker-examples/extending/embedding-dags/test_dag.py</span><a class="example-header-button viewcode-button reference internal" href="_modules/docs/docker-stack/docker-examples/extending/embedding-dags/test_dag.html"><span class="viewcode-link">[source]</span></a></p>
<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="sd">&quot;&quot;&quot;This dag only runs some simple tasks to test Airflow&#39;s task execution.&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">datetime</span>
<span class="kn">import</span> <span class="nn">pendulum</span>
<span class="kn">from</span> <span class="nn">airflow.models.dag</span> <span class="kn">import</span> <span class="n">DAG</span>
<span class="kn">from</span> <span class="nn">airflow.operators.empty</span> <span class="kn">import</span> <span class="n">EmptyOperator</span>
<span class="n">now</span> <span class="o">=</span> <span class="n">pendulum</span><span class="o">.</span><span class="n">now</span><span class="p">(</span><span class="n">tz</span><span class="o">=</span><span class="s2">&quot;UTC&quot;</span><span class="p">)</span>
<span class="n">now_to_the_hour</span> <span class="o">=</span> <span class="p">(</span><span class="n">now</span> <span class="o">-</span> <span class="n">datetime</span><span class="o">.</span><span class="n">timedelta</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">minute</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">second</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">microsecond</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>
<span class="n">START_DATE</span> <span class="o">=</span> <span class="n">now_to_the_hour</span>
<span class="n">DAG_NAME</span> <span class="o">=</span> <span class="s1">&#39;test_dag_v1&#39;</span>
<span class="n">dag</span> <span class="o">=</span> <span class="n">DAG</span><span class="p">(</span>
<span class="n">DAG_NAME</span><span class="p">,</span>
<span class="n">schedule_interval</span><span class="o">=</span><span class="s1">&#39;*/10 * * * *&#39;</span><span class="p">,</span>
<span class="n">default_args</span><span class="o">=</span><span class="p">{</span><span class="s1">&#39;depends_on_past&#39;</span><span class="p">:</span> <span class="kc">True</span><span class="p">},</span>
<span class="n">start_date</span><span class="o">=</span><span class="n">pendulum</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2021</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">tz</span><span class="o">=</span><span class="s2">&quot;UTC&quot;</span><span class="p">),</span>
<span class="n">catchup</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">run_this_1</span> <span class="o">=</span> <span class="n">EmptyOperator</span><span class="p">(</span><span class="n">task_id</span><span class="o">=</span><span class="s1">&#39;run_this_1&#39;</span><span class="p">,</span> <span class="n">dag</span><span class="o">=</span><span class="n">dag</span><span class="p">)</span>
<span class="n">run_this_2</span> <span class="o">=</span> <span class="n">EmptyOperator</span><span class="p">(</span><span class="n">task_id</span><span class="o">=</span><span class="s1">&#39;run_this_2&#39;</span><span class="p">,</span> <span class="n">dag</span><span class="o">=</span><span class="n">dag</span><span class="p">)</span>
<span class="n">run_this_2</span><span class="o">.</span><span class="n">set_upstream</span><span class="p">(</span><span class="n">run_this_1</span><span class="p">)</span>
<span class="n">run_this_3</span> <span class="o">=</span> <span class="n">EmptyOperator</span><span class="p">(</span><span class="n">task_id</span><span class="o">=</span><span class="s1">&#39;run_this_3&#39;</span><span class="p">,</span> <span class="n">dag</span><span class="o">=</span><span class="n">dag</span><span class="p">)</span>
<span class="n">run_this_3</span><span class="o">.</span><span class="n">set_upstream</span><span class="p">(</span><span class="n">run_this_2</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="customizing-the-image">
<h2>Customizing the image<a class="headerlink" href="#customizing-the-image" title="Permalink to this heading"></a></h2>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>BREAKING CHANGE! As of Airflow 2.3.0 you need to use
<a class="reference external" href="https://docs.docker.com/develop/develop-images/build_enhancements/">Buildkit</a> to build customized
Airflow Docker image. We are using new features of Building (and <code class="docutils literal notranslate"><span class="pre">dockerfile:1.4</span></code> syntax)
to make our image faster to build and “standalone” - i.e. not needing any extra files from
Airflow in order to be build. As of Airflow 2.3.0, the <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> that is released with Airflow
does not need any extra folders or files and can be copied and used from any folder.
Previously you needed to copy Airflow sources together with the Dockerfile as some scripts were
needed to make it work. You also need to use <code class="docutils literal notranslate"><span class="pre">DOCKER_CONTEXT_FILES</span></code> build arg if you want to
use your own custom files during the build (see
<a class="reference internal" href="#using-docker-context-files"><span class="std std-ref">Using docker context files</span></a> for details).</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You can usually use the latest <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> released by Airflow to build previous Airflow versions.
Note however, that there are slight changes in the Dockerfile and entrypoint scripts that can make it
behave slightly differently, depending which Dockerfile version you used. Details of what has changed
in each of the released versions of Docker image can be found in the <a class="reference internal" href="changelog.html"><span class="doc">Changelog</span></a>.</p>
</div>
<p>Prerequisites for building customized docker image:</p>
<ul class="simple">
<li><p>You need to enable <a class="reference external" href="https://docs.docker.com/develop/develop-images/build_enhancements/">Buildkit</a> to
build the image. This can be done by setting <code class="docutils literal notranslate"><span class="pre">DOCKER_BUILDKIT=1</span></code> as an environment variable
or by installing <a class="reference external" href="https://docs.docker.com/buildx/working-with-buildx/">the buildx plugin</a>
and running <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">buildx</span> <span class="pre">build</span></code> command.</p></li>
<li><p>You need to have a new Docker installed to handle <code class="docutils literal notranslate"><span class="pre">1.4</span></code> syntax of the Dockerfile.
Docker version <code class="docutils literal notranslate"><span class="pre">20.10.7</span></code> and above is known to work.</p></li>
</ul>
<p>Before attempting to customize the image, you need to download flexible and customizable <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code>.
You can extract the officially released version of the Dockerfile from the
<a class="reference external" href="https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-sources.html">released sources</a>.
You can also conveniently download the latest released version
<a class="reference external" href="https://raw.githubusercontent.com/apache/airflow/|version|/Dockerfile">from GitHub</a>. You can save it
in any directory - there is no need for any other files to be present there. If you wish to use your own
files (for example custom configuration of <code class="docutils literal notranslate"><span class="pre">pip</span></code> or your own <code class="docutils literal notranslate"><span class="pre">requirements</span></code> or custom dependencies,
you need to use <code class="docutils literal notranslate"><span class="pre">DOCKER_CONTEXT_FILES</span></code> build arg and place the files in the directory pointed at by
the arg (see <a class="reference internal" href="#using-docker-context-files"><span class="std std-ref">Using docker context files</span></a> for details).</p>
<p>Customizing the image is an optimized way of adding your own dependencies to the image - better
suited to prepare highly optimized (for size) production images, especially when you have dependencies
that require to be compiled before installing (such as <code class="docutils literal notranslate"><span class="pre">mpi4py</span></code>).</p>
<p>It also allows more sophisticated usages, needed by “Power-users” - for example using forked version
of Airflow, or building the images from security-vetted sources.</p>
<p>The big advantage of this method is that it produces optimized image even if you need some compile-time
dependencies that are not needed in the final image.</p>
<p>The disadvantage it that building the image takes longer and it requires you to use
the Dockerfile that is released as part of Apache Airflow sources.</p>
<p>The disadvantage is that the pattern of building Docker images with <code class="docutils literal notranslate"><span class="pre">--build-arg</span></code> is less familiar
to developers of such images. However it is quite well-known to “power-users”. That’s why the
customizing flow is better suited for those users who have more familiarity and have more custom
requirements.</p>
<p>The image also usually builds much longer than the equivalent “Extended” image because instead of
extending the layers that are already coming from the base image, it rebuilds the layers needed
to add extra dependencies needed at early stages of image building.</p>
<p>When customizing the image you can choose a number of options how you install Airflow:</p>
<ul class="simple">
<li><p>From the PyPI releases (default)</p></li>
<li><p>From the custom installation sources - using additional/replacing the original apt or PyPI repositories</p></li>
<li><p>From local sources. This is used mostly during development.</p></li>
<li><p>From tag or branch, or specific commit from a GitHub Airflow repository (or fork). This is particularly
useful when you build image for a custom version of Airflow that you keep in your fork and you do not
want to release the custom Airflow version to PyPI.</p></li>
<li><p>From locally stored binary packages for Airflow, Airflow Providers and other dependencies. This is
particularly useful if you want to build Airflow in a highly-secure environment where all such packages
must be vetted by your security team and stored in your private artifact registry. This also
allows to build airflow image in an air-gaped environment.</p></li>
<li><p>Side note. Building <code class="docutils literal notranslate"><span class="pre">Airflow</span></code> in an <code class="docutils literal notranslate"><span class="pre">air-gaped</span></code> environment sounds pretty funny, doesn’t it?</p></li>
</ul>
<p>You can also add a range of customizations while building the image:</p>
<ul class="simple">
<li><p>base python image you use for Airflow</p></li>
<li><p>version of Airflow to install</p></li>
<li><p>extras to install for Airflow (or even removing some default extras)</p></li>
<li><p>additional apt/python dependencies to use while building Airflow (DEV dependencies)</p></li>
<li><p>add <code class="docutils literal notranslate"><span class="pre">requirements.txt</span></code> file to <code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code> directory to add extra requirements</p></li>
<li><p>additional apt/python dependencies to install for runtime version of Airflow (RUNTIME dependencies)</p></li>
<li><p>additional commands and variables to set if needed during building or preparing Airflow runtime</p></li>
<li><p>choosing constraint file to use when installing Airflow</p></li>
</ul>
<p>Additional explanation is needed for the last point. Airflow uses constraints to make sure
that it can be predictably installed, even if some new versions of Airflow dependencies are
released (or even dependencies of our dependencies!). The docker image and accompanying scripts
usually determine automatically the right versions of constraints to be used based on the Airflow
version installed and Python version. For example 2.0.2 version of Airflow installed from PyPI
uses constraints from <code class="docutils literal notranslate"><span class="pre">constraints-2.0.2</span></code> tag). However in some cases - when installing airflow from
GitHub for example - you have to manually specify the version of constraints used, otherwise
it will default to the latest version of the constraints which might not be compatible with the
version of Airflow you use.</p>
<p>You can also download any version of Airflow constraints and adapt it with your own set of
constraints and manually set your own versions of dependencies in your own constraints and use the version
of constraints that you manually prepared.</p>
<p>You can read more about constraints in <a class="reference external" href="/docs/apache-airflow/stable/installation/installing-from-pypi.html" title="(in apache-airflow v2.4.0.dev0)"><span>Installation from PyPI</span></a></p>
<p>Note that if you place <code class="docutils literal notranslate"><span class="pre">requirements.txt</span></code> in the <code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code> folder, it will be
used to install all requirements declared there. It is recommended that the file
contains specified version of dependencies to add with <code class="docutils literal notranslate"><span class="pre">==</span></code> version specifier, to achieve
stable set of requirements, independent if someone releases a newer version. However you have
to make sure to update those requirements and rebuild the images to account for latest security fixes.</p>
</div>
<div class="section" id="choosing-debian-version-when-customizing-the-image">
<h2>Choosing Debian version when customizing the image<a class="headerlink" href="#choosing-debian-version-when-customizing-the-image" title="Permalink to this heading"></a></h2>
<p>The reference Airflow image currently uses <code class="docutils literal notranslate"><span class="pre">bullseye</span></code> version of Debian (also known as Debian 10) as base
image, however when you want to build a custom image, you can also use <code class="docutils literal notranslate"><span class="pre">buster</span></code> version of base images.
Airflow supports both versions of Debian. You choose which version of Debian to use by choosing the
right version of python base image:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">--build-arg</span> <span class="pre">PYTHON_BASE_IMAGE=&quot;python:3.7-slim-buster</span></code> uses buster version of Debian (Debian 10)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--build-arg</span> <span class="pre">PYTHON_BASE_IMAGE=&quot;python:3.7-slim-bullseye</span></code> uses bullseye version of Debian (Debian 11)</p></li>
</ul>
</div>
<div class="section" id="using-docker-context-files">
<span id="id2"></span><h2>Using docker-context-files<a class="headerlink" href="#using-docker-context-files" title="Permalink to this heading"></a></h2>
<p>When customizing the image, you can optionally make Airflow install custom binaries or provide custom
configuration for your pip in <code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code>. In order to enable it, you need to add
<code class="docutils literal notranslate"><span class="pre">--build-arg</span> <span class="pre">DOCKER_CONTEXT_FILES=docker-context-files</span></code> build arg when you build the image.
You can pass any subdirectory of your docker context, it will always be mapped to <code class="docutils literal notranslate"><span class="pre">/docker-context-files</span></code>
during the build.</p>
<p>You can use <code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code> for the following purposes:</p>
<ul class="simple">
<li><p>you can place <code class="docutils literal notranslate"><span class="pre">requirements.txt</span></code> and add any <code class="docutils literal notranslate"><span class="pre">pip</span></code> packages you want to install in the
<code class="docutils literal notranslate"><span class="pre">docker-context-file</span></code> folder. Those requirements will be automatically installed during the build.</p></li>
</ul>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/customizing/own-requirements.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir -p docker-context-files
cat <span class="s">&lt;&lt;EOF &gt;./docker-context-files/requirements.txt</span>
<span class="s">beautifulsoup4==4.10.0</span>
<span class="s">EOF</span>
<span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . <span class="se">\</span>
--build-arg <span class="nv">DOCKER_CONTEXT_FILES</span><span class="o">=</span>./docker-context-files <span class="se">\</span>
--tag <span class="s2">&quot;my-beautifulsoup4-airflow:0.0.1&quot;</span>
docker run -it my-beautifulsoup4-airflow:0.0.1 python -c <span class="s1">&#39;import bs4; import sys; sys.exit(0)&#39;</span> <span class="o">&amp;&amp;</span> <span class="se">\</span>
<span class="nb">echo</span> <span class="s2">&quot;Success! Beautifulsoup4 installed&quot;</span> <span class="o">&amp;&amp;</span> <span class="nb">echo</span>
</pre></div>
</div>
</div>
<ul class="simple">
<li><p>you can place <code class="docutils literal notranslate"><span class="pre">pip.conf</span></code> (and legacy <code class="docutils literal notranslate"><span class="pre">.piprc</span></code>) in the <code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code> folder and they
will be used for all <code class="docutils literal notranslate"><span class="pre">pip</span></code> commands (for example you can configure your own sources
or authentication mechanisms)</p></li>
</ul>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/customizing/custom-pip.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir -p docker-context-files
cat <span class="s">&lt;&lt;EOF &gt;./docker-context-files/pip.conf</span>
<span class="s">[global]</span>
<span class="s">verbose = 2</span>
<span class="s">EOF</span>
<span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . <span class="se">\</span>
--build-arg <span class="nv">DOCKER_CONTEXT_FILES</span><span class="o">=</span>./docker-context-files <span class="se">\</span>
--tag <span class="s2">&quot;my-custom-pip-verbose-airflow:0.0.1&quot;</span>
docker run -it my-beautifulsoup4-airflow:0.0.1 python -c <span class="s1">&#39;import bs4; import sys; sys.exit(0)&#39;</span> <span class="o">&amp;&amp;</span> <span class="se">\</span>
<span class="nb">echo</span> <span class="s2">&quot;Success! Beautifulsoup4 installed&quot;</span> <span class="o">&amp;&amp;</span> <span class="nb">echo</span>
</pre></div>
</div>
</div>
<ul class="simple">
<li><p>you can place <code class="docutils literal notranslate"><span class="pre">.whl</span></code> packages that you downloaded and install them with
<code class="docutils literal notranslate"><span class="pre">INSTALL_PACKAGES_FROM_CONTEXT</span></code> set to <code class="docutils literal notranslate"><span class="pre">true</span></code> . It’s useful if you build the image in
restricted security environments (see: <a class="reference internal" href="#image-build-secure-environments"><span class="std std-ref">Build images in security restricted environments</span></a> for details):</p></li>
</ul>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/restricted/restricted_environments.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir -p docker-context-files
<span class="nb">export</span> <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="s2">&quot;2.2.4&quot;</span>
rm docker-context-files/*.whl docker-context-files/*.tar.gz docker-context-files/*.txt <span class="o">||</span> <span class="nb">true</span>
curl -Lo <span class="s2">&quot;docker-context-files/constraints-3.7.txt&quot;</span> <span class="se">\</span>
<span class="s2">&quot;https://raw.githubusercontent.com/apache/airflow/constraints-</span><span class="si">${</span><span class="nv">AIRFLOW_VERSION</span><span class="si">}</span><span class="s2">/constraints-3.7.txt&quot;</span>
<span class="nb">echo</span>
<span class="nb">echo</span> <span class="s2">&quot;Make sure you use the right python version here (should be same as in constraints)!&quot;</span>
<span class="nb">echo</span>
python --version
pip download --dest docker-context-files <span class="se">\</span>
--constraint docker-context-files/constraints-3.7.txt <span class="se">\</span>
<span class="s2">&quot;apache-airflow[async,celery,elasticsearch,kubernetes,postgres,redis,ssh,statsd,virtualenv]==</span><span class="si">${</span><span class="nv">AIRFLOW_VERSION</span><span class="si">}</span><span class="s2">&quot;</span>
</pre></div>
</div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You can also pass <code class="docutils literal notranslate"><span class="pre">--build-arg</span> <span class="pre">DOCKER_CONTEXT_FILES=.</span></code> if you want to place your <code class="docutils literal notranslate"><span class="pre">requirements.txt</span></code>
in main directory without creating a dedicated folder, however this is a good practice to keep any files
that you copy to the image context in a sub-folder. This makes it easier to separate things that
are used on the host from those that are passed in Docker context. Of course, by default when you run
<code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">build</span> <span class="pre">.</span></code> the whole folder is available as “Docker build context” and sent to the docker
engine, but the <code class="docutils literal notranslate"><span class="pre">DOCKER_CONTEXT_FILES</span></code> are always copied to the <code class="docutils literal notranslate"><span class="pre">build</span></code> segment of the image so
copying all your local folder might unnecessarily increase time needed to build the image and your
cache will be invalidated every time any of the files in your local folder change.</p>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>BREAKING CHANGE! As of Airflow 2.3.0 you need to specify additional flag:
<code class="docutils literal notranslate"><span class="pre">--build-arg</span> <span class="pre">DOCKER_CONTEXT_Files=docker-context-files</span></code> in order to use the files placed
in <code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code>. Previously that switch was not needed. Unfortunately this change is needed
in order to enable <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> as standalone Dockerfile without any extra files. As of Airflow 2.3.0
the <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> that is released with Airflow does not need any extra folders or files and can
be copied and used from any folder. Previously you needed to copy Airflow sources together with the
Dockerfile as some scripts were needed to make it work. With Airflow 2.3.0, we are using <code class="docutils literal notranslate"><span class="pre">Buildkit</span></code>
features that enable us to make the <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> a completely standalone file that can be used “as-is”.</p>
</div>
</div>
<div class="section" id="examples-of-image-customizing">
<h2>Examples of image customizing<a class="headerlink" href="#examples-of-image-customizing" title="Permalink to this heading"></a></h2>
<div class="section" id="building-from-pypi-packages">
<span id="image-build-pypi"></span><h3>Building from PyPI packages<a class="headerlink" href="#building-from-pypi-packages" title="Permalink to this heading"></a></h3>
<p>This is the basic way of building the custom images from sources.</p>
<p>The following example builds the production image in version <code class="docutils literal notranslate"><span class="pre">3.7</span></code> with latest PyPI-released Airflow,
with default set of Airflow extras and dependencies. The latest PyPI-released Airflow constraints are used automatically.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/customizing/stable-airflow.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . <span class="se">\</span>
--tag <span class="s2">&quot;my-stable-airflow:0.0.1&quot;</span>
</pre></div>
</div>
</div>
<p>The following example builds the production image in version <code class="docutils literal notranslate"><span class="pre">3.7</span></code> with default extras from <code class="docutils literal notranslate"><span class="pre">2.3.0</span></code> Airflow
package. The <code class="docutils literal notranslate"><span class="pre">2.3.0</span></code> constraints are used automatically.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/customizing/pypi-selected-version.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="m">2</span>.3.3
<span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . <span class="se">\</span>
--build-arg <span class="nv">PYTHON_BASE_IMAGE</span><span class="o">=</span><span class="s2">&quot;python:3.7-slim-bullseye&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">AIRFLOW_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--tag <span class="s2">&quot;my-pypi-selected-version:0.0.1&quot;</span>
</pre></div>
</div>
</div>
<p>The following example builds the production image in version <code class="docutils literal notranslate"><span class="pre">3.8</span></code> with additional airflow extras
(<code class="docutils literal notranslate"><span class="pre">mssql,hdfs</span></code>) from <code class="docutils literal notranslate"><span class="pre">2.3.0</span></code> PyPI package, and additional dependency (<code class="docutils literal notranslate"><span class="pre">oauth2client</span></code>).</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/customizing/pypi-extras-and-deps.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="m">2</span>.3.3
<span class="nb">export</span> <span class="nv">DEBIAN_VERSION</span><span class="o">=</span><span class="s2">&quot;bullseye&quot;</span>
<span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . <span class="se">\</span>
--pull <span class="se">\</span>
--build-arg <span class="nv">PYTHON_BASE_IMAGE</span><span class="o">=</span><span class="s2">&quot;python:3.8-slim-</span><span class="si">${</span><span class="nv">DEBIAN_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">AIRFLOW_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_AIRFLOW_EXTRAS</span><span class="o">=</span><span class="s2">&quot;mssql,hdfs&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_PYTHON_DEPS</span><span class="o">=</span><span class="s2">&quot;oauth2client&quot;</span> <span class="se">\</span>
--tag <span class="s2">&quot;my-pypi-extras-and-deps:0.0.1&quot;</span>
</pre></div>
</div>
</div>
<p>The following example adds <code class="docutils literal notranslate"><span class="pre">mpi4py</span></code> package which requires both <code class="docutils literal notranslate"><span class="pre">build-essential</span></code> and <code class="docutils literal notranslate"><span class="pre">mpi</span> <span class="pre">compiler</span></code>.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/customizing/add-build-essential-custom.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="m">2</span>.2.4
<span class="nb">export</span> <span class="nv">DEBIAN_VERSION</span><span class="o">=</span><span class="s2">&quot;bullseye&quot;</span>
<span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . <span class="se">\</span>
--pull <span class="se">\</span>
--build-arg <span class="nv">PYTHON_BASE_IMAGE</span><span class="o">=</span><span class="s2">&quot;python:3.7-slim-</span><span class="si">${</span><span class="nv">DEBIAN_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">AIRFLOW_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_PYTHON_DEPS</span><span class="o">=</span><span class="s2">&quot;mpi4py&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_DEV_APT_DEPS</span><span class="o">=</span><span class="s2">&quot;libopenmpi-dev&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_RUNTIME_APT_DEPS</span><span class="o">=</span><span class="s2">&quot;openmpi-common&quot;</span> <span class="se">\</span>
--tag <span class="s2">&quot;my-build-essential-image:0.0.1&quot;</span>
</pre></div>
</div>
</div>
<p>The above image is equivalent of the “extended” image from previous chapter but its size is only
874 MB. Comparing to 1.1 GB of the “extended image” this is about 230 MB less, so you can achieve ~20%
improvement in size of the image by using “customization” vs. extension. The saving can increase in case you
have more complex dependencies to build.</p>
</div>
<div class="section" id="building-optimized-images">
<span id="image-build-optimized"></span><h3>Building optimized images<a class="headerlink" href="#building-optimized-images" title="Permalink to this heading"></a></h3>
<p>The following example the production image in version <code class="docutils literal notranslate"><span class="pre">3.7</span></code> with additional airflow extras from <code class="docutils literal notranslate"><span class="pre">2.0.2</span></code>
PyPI package but it includes additional apt dev and runtime dependencies.</p>
<p>The dev dependencies are those that require <code class="docutils literal notranslate"><span class="pre">build-essential</span></code> and usually need to involve recompiling
of some python dependencies so those packages might require some additional DEV dependencies to be
present during recompilation. Those packages are not needed at runtime, so we only install them for the
“build” time. They are not installed in the final image, thus producing much smaller images.
In this case pandas requires recompilation so it also needs gcc and g++ as dev APT dependencies.
The <code class="docutils literal notranslate"><span class="pre">jre-headless</span></code> does not require recompiling so it can be installed as the runtime APT dependency.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/customizing/pypi-dev-runtime-deps.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="m">2</span>.2.4
<span class="nb">export</span> <span class="nv">DEBIAN_VERSION</span><span class="o">=</span><span class="s2">&quot;bullseye&quot;</span>
<span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . <span class="se">\</span>
--pull <span class="se">\</span>
--build-arg <span class="nv">PYTHON_BASE_IMAGE</span><span class="o">=</span><span class="s2">&quot;python:3.7-slim-</span><span class="si">${</span><span class="nv">DEBIAN_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">AIRFLOW_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_AIRFLOW_EXTRAS</span><span class="o">=</span><span class="s2">&quot;jdbc&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_PYTHON_DEPS</span><span class="o">=</span><span class="s2">&quot;pandas&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_DEV_APT_DEPS</span><span class="o">=</span><span class="s2">&quot;gcc g++&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_RUNTIME_APT_DEPS</span><span class="o">=</span><span class="s2">&quot;default-jre-headless&quot;</span> <span class="se">\</span>
--tag <span class="s2">&quot;my-pypi-dev-runtime:0.0.1&quot;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="building-from-github">
<span id="image-build-github"></span><h3>Building from GitHub<a class="headerlink" href="#building-from-github" title="Permalink to this heading"></a></h3>
<p>This method is usually used for development purpose. But in case you have your own fork you can point
it to your forked version of source code without having to release it to PyPI. It is enough to have
a branch or tag in your repository and use the tag or branch in the URL that you point the installation to.</p>
<p>In case of GitHub builds you need to pass the constraints reference manually in case you want to use
specific constraints, otherwise the default <code class="docutils literal notranslate"><span class="pre">constraints-main</span></code> is used.</p>
<p>The following example builds the production image in version <code class="docutils literal notranslate"><span class="pre">3.7</span></code> with default extras from the latest main version and
constraints are taken from latest version of the constraints-main branch in GitHub.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/customizing/github-main.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">DEBIAN_VERSION</span><span class="o">=</span><span class="s2">&quot;bullseye&quot;</span>
<span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . <span class="se">\</span>
--pull <span class="se">\</span>
--build-arg <span class="nv">PYTHON_BASE_IMAGE</span><span class="o">=</span><span class="s2">&quot;python:3.7-slim-</span><span class="si">${</span><span class="nv">DEBIAN_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_INSTALLATION_METHOD</span><span class="o">=</span><span class="s2">&quot;https://github.com/apache/airflow/archive/main.tar.gz#egg=apache-airflow&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_CONSTRAINTS_REFERENCE</span><span class="o">=</span><span class="s2">&quot;constraints-main&quot;</span> <span class="se">\</span>
--tag <span class="s2">&quot;my-github-main:0.0.1&quot;</span>
</pre></div>
</div>
</div>
<p>The following example builds the production image with default extras from the
latest <code class="docutils literal notranslate"><span class="pre">v2-*-test</span></code> version and constraints are taken from the latest version of
the <code class="docutils literal notranslate"><span class="pre">constraints-2-*</span></code> branch in GitHub (for example <code class="docutils literal notranslate"><span class="pre">v2-2-test</span></code> branch matches <code class="docutils literal notranslate"><span class="pre">constraints-2-2</span></code>).
Note that this command might fail occasionally as only the “released version” constraints when building a
version and “main” constraints when building main are guaranteed to work.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/customizing/github-v2-2-test.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">DEBIAN_VERSION</span><span class="o">=</span><span class="s2">&quot;bullseye&quot;</span>
<span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . <span class="se">\</span>
--pull <span class="se">\</span>
--build-arg <span class="nv">PYTHON_BASE_IMAGE</span><span class="o">=</span><span class="s2">&quot;python:3.8-slim-</span><span class="si">${</span><span class="nv">DEBIAN_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_INSTALLATION_METHOD</span><span class="o">=</span><span class="s2">&quot;https://github.com/apache/airflow/archive/v2-2-test.tar.gz#egg=apache-airflow&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_CONSTRAINTS_REFERENCE</span><span class="o">=</span><span class="s2">&quot;constraints-2-2&quot;</span> <span class="se">\</span>
--tag <span class="s2">&quot;my-github-v2-2:0.0.1&quot;</span>
</pre></div>
</div>
</div>
<p>You can also specify another repository to build from. If you also want to use different constraints
repository source, you must specify it as additional <code class="docutils literal notranslate"><span class="pre">CONSTRAINTS_GITHUB_REPOSITORY</span></code> build arg.</p>
<p>The following example builds the production image using <code class="docutils literal notranslate"><span class="pre">potiuk/airflow</span></code> fork of Airflow and constraints
are also downloaded from that repository.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/customizing/github-different-repository.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">DEBIAN_VERSION</span><span class="o">=</span><span class="s2">&quot;bullseye&quot;</span>
<span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . <span class="se">\</span>
--pull <span class="se">\</span>
--build-arg <span class="nv">PYTHON_BASE_IMAGE</span><span class="o">=</span><span class="s2">&quot;python:3.8-slim-</span><span class="si">${</span><span class="nv">DEBIAN_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_INSTALLATION_METHOD</span><span class="o">=</span><span class="s2">&quot;https://github.com/potiuk/airflow/archive/main.tar.gz#egg=apache-airflow&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_CONSTRAINTS_REFERENCE</span><span class="o">=</span><span class="s2">&quot;constraints-main&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">CONSTRAINTS_GITHUB_REPOSITORY</span><span class="o">=</span><span class="s2">&quot;potiuk/airflow&quot;</span> <span class="se">\</span>
--tag <span class="s2">&quot;github-different-repository-image:0.0.1&quot;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="using-custom-installation-sources">
<span id="image-build-custom"></span><h3>Using custom installation sources<a class="headerlink" href="#using-custom-installation-sources" title="Permalink to this heading"></a></h3>
<p>You can customize more aspects of the image - such as additional commands executed before apt dependencies
are installed, or adding extra sources to install your dependencies from. You can see all the arguments
described below but here is an example of rather complex command to customize the image
based on example in <a class="reference external" href="https://github.com/apache/airflow/issues/8605#issuecomment-690065621">this comment</a>:</p>
<p>In case you need to use your custom PyPI package indexes, you can also customize PYPI sources used during
image build by adding a <code class="docutils literal notranslate"><span class="pre">docker-context-files/pip.conf</span></code> file when building the image.
This <code class="docutils literal notranslate"><span class="pre">pip.conf</span></code> will not be committed to the repository (it is added to <code class="docutils literal notranslate"><span class="pre">.gitignore</span></code>) and it will not be
present in the final production image. It is added and used only in the build segment of the image.
Therefore this <code class="docutils literal notranslate"><span class="pre">pip.conf</span></code> file can safely contain list of package indexes you want to use,
usernames and passwords used for authentication. More details about <code class="docutils literal notranslate"><span class="pre">pip.conf</span></code> file can be found in the
<a class="reference external" href="https://pip.pypa.io/en/stable/topics/configuration/">pip configuration</a>.</p>
<p>If you used the <code class="docutils literal notranslate"><span class="pre">.piprc</span></code> before (some older versions of <code class="docutils literal notranslate"><span class="pre">pip</span></code> used it for customization), you can put it
in the <code class="docutils literal notranslate"><span class="pre">docker-context-files/.piprc</span></code> file and it will be automatically copied to <code class="docutils literal notranslate"><span class="pre">HOME</span></code> directory
of the <code class="docutils literal notranslate"><span class="pre">airflow</span></code> user.</p>
<p>Note, that those customizations are only available in the <code class="docutils literal notranslate"><span class="pre">build</span></code> segment of the Airflow image and they
are not present in the <code class="docutils literal notranslate"><span class="pre">final</span></code> image. If you wish to extend the final image and add custom <code class="docutils literal notranslate"><span class="pre">.piprc</span></code> and
<code class="docutils literal notranslate"><span class="pre">pip.conf</span></code>, you should add them in your own Dockerfile used to extend the Airflow image.</p>
<p>Such customizations are independent of the way how airflow is installed.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Similar results could be achieved by modifying the Dockerfile manually (see below) and injecting the
commands needed, but by specifying the customizations via build-args, you avoid the need of
synchronizing the changes from future Airflow Dockerfiles. Those customizations should work with the
future version of Airflow’s official <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> at most with minimal modifications od parameter
names (if any), so using the build command for your customizations makes your custom image more
future-proof.</p>
</div>
<p>The following - rather complex - example shows capabilities of:</p>
<ul class="simple">
<li><p>Adding airflow extras (slack, odbc)</p></li>
<li><p>Adding PyPI dependencies (<code class="docutils literal notranslate"><span class="pre">azure-storage-blob,</span> <span class="pre">oauth2client,</span> <span class="pre">beautifulsoup4,</span> <span class="pre">dateparser,</span> <span class="pre">rocketchat_API,typeform</span></code>)</p></li>
<li><p>Adding custom environment variables while installing <code class="docutils literal notranslate"><span class="pre">apt</span></code> dependencies - both DEV and RUNTIME
(<code class="docutils literal notranslate"><span class="pre">ACCEPT_EULA=Y'</span></code>)</p></li>
<li><p>Adding custom curl command for adding keys and configuring additional apt sources needed to install
<code class="docutils literal notranslate"><span class="pre">apt</span></code> dependencies (both DEV and RUNTIME)</p></li>
<li><p>Adding custom <code class="docutils literal notranslate"><span class="pre">apt</span></code> dependencies, both DEV (<code class="docutils literal notranslate"><span class="pre">msodbcsql17</span> <span class="pre">unixodbc-dev</span> <span class="pre">g++)</span> <span class="pre">and</span> <span class="pre">runtime</span> <span class="pre">msodbcsql17</span> <span class="pre">unixodbc</span> <span class="pre">git</span> <span class="pre">procps</span> <span class="pre">vim</span></code>)</p></li>
</ul>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/customizing/custom-sources.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="m">2</span>.2.4
<span class="nb">export</span> <span class="nv">DEBIAN_VERSION</span><span class="o">=</span><span class="s2">&quot;buster&quot;</span>
<span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . -f Dockerfile <span class="se">\</span>
--pull <span class="se">\</span>
--platform <span class="s1">&#39;linux/amd64&#39;</span> <span class="se">\</span>
--build-arg <span class="nv">PYTHON_BASE_IMAGE</span><span class="o">=</span><span class="s2">&quot;python:3.7-slim-</span><span class="si">${</span><span class="nv">DEBIAN_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">AIRFLOW_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_AIRFLOW_EXTRAS</span><span class="o">=</span><span class="s2">&quot;slack,odbc&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_PYTHON_DEPS</span><span class="o">=</span><span class="s2">&quot; \</span>
<span class="s2"> azure-storage-blob&lt;12.9.0 \</span>
<span class="s2"> oauth2client \</span>
<span class="s2"> beautifulsoup4 \</span>
<span class="s2"> dateparser \</span>
<span class="s2"> rocketchat_API \</span>
<span class="s2"> typeform&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_DEV_APT_COMMAND</span><span class="o">=</span><span class="s2">&quot;curl https://packages.microsoft.com/keys/microsoft.asc | \</span>
<span class="s2"> apt-key add --no-tty - &amp;&amp; \</span>
<span class="s2"> curl https://packages.microsoft.com/config/debian/10/prod.list &gt; /etc/apt/sources.list.d/mssql-release.list&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_DEV_APT_ENV</span><span class="o">=</span><span class="s2">&quot;ACCEPT_EULA=Y&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_DEV_APT_DEPS</span><span class="o">=</span><span class="s2">&quot;msodbcsql17 unixodbc-dev g++&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_RUNTIME_APT_COMMAND</span><span class="o">=</span><span class="s2">&quot;curl https://packages.microsoft.com/keys/microsoft.asc | \</span>
<span class="s2"> apt-key add --no-tty - &amp;&amp; \</span>
<span class="s2"> curl https://packages.microsoft.com/config/debian/10/prod.list &gt; /etc/apt/sources.list.d/mssql-release.list&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_RUNTIME_APT_ENV</span><span class="o">=</span><span class="s2">&quot;ACCEPT_EULA=Y&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">ADDITIONAL_RUNTIME_APT_DEPS</span><span class="o">=</span><span class="s2">&quot;msodbcsql17 unixodbc git procps vim&quot;</span> <span class="se">\</span>
--tag <span class="s2">&quot;my-custom-sources-image:0.0.1&quot;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="build-images-in-security-restricted-environments">
<span id="image-build-secure-environments"></span><h3>Build images in security restricted environments<a class="headerlink" href="#build-images-in-security-restricted-environments" title="Permalink to this heading"></a></h3>
<p>You can also make sure your image is only built using local constraint file and locally downloaded
wheel files. This is often useful in Enterprise environments where the binary files are verified and
vetted by the security teams. It is also the most complex way of building the image. You should be an
expert of building and using Dockerfiles in order to use it and have to have specific needs of security if
you want to follow that route.</p>
<p>This builds below builds the production image with packages and constraints used from the local
<code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code> rather than installed from PyPI or GitHub. It also disables MySQL client
installation as it is using external installation method.</p>
<p>Note that as a prerequisite - you need to have downloaded wheel files. In the example below we
first download such constraint file locally and then use <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">download</span></code> to get the <code class="docutils literal notranslate"><span class="pre">.whl</span></code> files needed
but in most likely scenario, those wheel files should be copied from an internal repository of such .whl
files. Note that <code class="docutils literal notranslate"><span class="pre">AIRFLOW_VERSION_SPECIFICATION</span></code> is only there for reference, the apache airflow <code class="docutils literal notranslate"><span class="pre">.whl</span></code> file
in the right version is part of the <code class="docutils literal notranslate"><span class="pre">.whl</span></code> files downloaded.</p>
<p>Note that ‘pip download’ will only works on Linux host as some of the packages need to be compiled from
sources and you cannot install them providing <code class="docutils literal notranslate"><span class="pre">--platform</span></code> switch. They also need to be downloaded using
the same python version as the target image.</p>
<p>The <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">download</span></code> might happen in a separate environment. The files can be committed to a separate
binary repository and vetted/verified by the security team and used subsequently to build images
of Airflow when needed on an air-gaped system.</p>
<p>Example of preparing the constraint files and wheel files. Note that <code class="docutils literal notranslate"><span class="pre">mysql</span></code> dependency is removed
as <code class="docutils literal notranslate"><span class="pre">mysqlclient</span></code> is installed from Oracle’s <code class="docutils literal notranslate"><span class="pre">apt</span></code> repository and if you want to add it, you need
to provide this library from your repository if you want to build Airflow image in an “air-gaped” system.</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/restricted/restricted_environments.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir -p docker-context-files
<span class="nb">export</span> <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="s2">&quot;2.2.4&quot;</span>
rm docker-context-files/*.whl docker-context-files/*.tar.gz docker-context-files/*.txt <span class="o">||</span> <span class="nb">true</span>
curl -Lo <span class="s2">&quot;docker-context-files/constraints-3.7.txt&quot;</span> <span class="se">\</span>
<span class="s2">&quot;https://raw.githubusercontent.com/apache/airflow/constraints-</span><span class="si">${</span><span class="nv">AIRFLOW_VERSION</span><span class="si">}</span><span class="s2">/constraints-3.7.txt&quot;</span>
<span class="nb">echo</span>
<span class="nb">echo</span> <span class="s2">&quot;Make sure you use the right python version here (should be same as in constraints)!&quot;</span>
<span class="nb">echo</span>
python --version
pip download --dest docker-context-files <span class="se">\</span>
--constraint docker-context-files/constraints-3.7.txt <span class="se">\</span>
<span class="s2">&quot;apache-airflow[async,celery,elasticsearch,kubernetes,postgres,redis,ssh,statsd,virtualenv]==</span><span class="si">${</span><span class="nv">AIRFLOW_VERSION</span><span class="si">}</span><span class="s2">&quot;</span>
</pre></div>
</div>
</div>
<p>After this step is finished, your <code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code> folder will contain all the packages that
are needed to install Airflow from.</p>
<p>Those downloaded packages and constraint file can be pre-vetted by your security team before you attempt
to install the image. You can also store those downloaded binary packages in your private artifact registry
which allows for the flow where you will download the packages on one machine, submit only new packages for
security vetting and only use the new packages when they were vetted.</p>
<p>On a separate (air-gaped) system, all the PyPI packages can be copied to <code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code>
where you can build the image using the packages downloaded by passing those build args:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">INSTALL_PACKAGES_FROM_CONTEXT=&quot;true&quot;</span></code> - to use packages present in <code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">AIRFLOW_PRE_CACHED_PIP_PACKAGES=&quot;false&quot;</span></code> - to not pre-cache packages from PyPI when building image</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">AIRFLOW_CONSTRAINTS_LOCATION=/docker-context-files/YOUR_CONSTRAINT_FILE.txt</span></code> - to downloaded constraint files</p></li>
<li><p>(Optional) <code class="docutils literal notranslate"><span class="pre">INSTALL_MYSQL_CLIENT=&quot;false&quot;</span></code> if you do not want to install <code class="docutils literal notranslate"><span class="pre">MySQL</span></code>
client from the Oracle repositories.</p></li>
<li><p>(Optional) <code class="docutils literal notranslate"><span class="pre">INSTALL_MSSQL_CLIENT=&quot;false&quot;</span></code> if you do not want to install <code class="docutils literal notranslate"><span class="pre">MsSQL</span></code>
client from the Microsoft repositories.</p></li>
<li><p>(Optional) <code class="docutils literal notranslate"><span class="pre">INSTALL_POSTGRES_CLIENT=&quot;false&quot;</span></code> if you do not want to install <code class="docutils literal notranslate"><span class="pre">Postgres</span></code>
client from the Postgres repositories.</p></li>
</ul>
<p>Note, that the solution we have for installing python packages from local packages, only solves the problem
of “air-gaped” python installation. The Docker image also downloads <code class="docutils literal notranslate"><span class="pre">apt</span></code> dependencies and <code class="docutils literal notranslate"><span class="pre">node-modules</span></code>.
Those types of dependencies are however more likely to be available in your “air-gaped” system via transparent
proxies and it should automatically reach out to your private registries, however in the future the
solution might be applied to both of those installation steps.</p>
<p>You can also use techniques described in the previous chapter to make <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">build</span></code> use your private
apt sources or private PyPI repositories (via <code class="docutils literal notranslate"><span class="pre">.pypirc</span></code>) available which can be security-vetted.</p>
<p>If you fulfill all the criteria, you can build the image on an air-gaped system by running command similar
to the below:</p>
<div class="example-block-wrapper docutils container">
<p class="example-header"><span class="example-title">docs/docker-stack/docker-examples/restricted/restricted_environments.sh</span></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">DEBIAN_VERSION</span><span class="o">=</span><span class="s2">&quot;bullseye&quot;</span>
<span class="nb">export</span> <span class="nv">DOCKER_BUILDKIT</span><span class="o">=</span><span class="m">1</span>
docker build . <span class="se">\</span>
--pull <span class="se">\</span>
--build-arg <span class="nv">PYTHON_BASE_IMAGE</span><span class="o">=</span><span class="s2">&quot;python:3.7-slim-</span><span class="si">${</span><span class="nv">DEBIAN_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_INSTALLATION_METHOD</span><span class="o">=</span><span class="s2">&quot;apache-airflow&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_VERSION</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">AIRFLOW_VERSION</span><span class="si">}</span><span class="s2">&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">INSTALL_MYSQL_CLIENT</span><span class="o">=</span><span class="s2">&quot;false&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">INSTALL_MSSQL_CLIENT</span><span class="o">=</span><span class="s2">&quot;false&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">INSTALL_POSTGRES_CLIENT</span><span class="o">=</span><span class="s2">&quot;true&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_PRE_CACHED_PIP_PACKAGES</span><span class="o">=</span><span class="s2">&quot;false&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">DOCKER_CONTEXT_FILES</span><span class="o">=</span><span class="s2">&quot;docker-context-files&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">INSTALL_PACKAGES_FROM_CONTEXT</span><span class="o">=</span><span class="s2">&quot;true&quot;</span> <span class="se">\</span>
--build-arg <span class="nv">AIRFLOW_CONSTRAINTS_LOCATION</span><span class="o">=</span><span class="s2">&quot;/docker-context-files/constraints-3.7.txt&quot;</span> <span class="se">\</span>
--tag airflow-my-restricted-environment:0.0.1
</pre></div>
</div>
</div>
</div>
<div class="section" id="modifying-the-dockerfile">
<h3>Modifying the Dockerfile<a class="headerlink" href="#modifying-the-dockerfile" title="Permalink to this heading"></a></h3>
<p>The build arg approach is a convenience method if you do not want to manually modify the <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code>.
Our approach is flexible enough, to be able to accommodate most requirements and
customizations out-of-the-box. When you use it, you do not need to worry about adapting the image every
time new version of Airflow is released. However sometimes it is not enough if you have very
specific needs and want to build a very custom image. In such case you can simply modify the
<code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> manually as you see fit and store it in your forked repository. However you will have to
make sure to rebase your changes whenever new version of Airflow is released, because we might modify
the approach of our Dockerfile builds in the future and you might need to resolve conflicts
and rebase your changes.</p>
<p>There are a few things to remember when you modify the <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code>:</p>
<ul>
<li><p>We are using the widely recommended pattern of <code class="docutils literal notranslate"><span class="pre">.dockerignore</span></code> where everything is ignored by default
and only the required folders are added through exclusion (!). This allows to keep docker context small
because there are many binary artifacts generated in the sources of Airflow and if they are added to
the context, the time of building the image would increase significantly. If you want to add any new
folders to be available in the image you must add them here with leading <code class="docutils literal notranslate"><span class="pre">!</span></code></p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span># Ignore everything
**
# Allow only these directories
!airflow
...
</pre></div>
</div>
</li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code> folder is automatically added to the context of the image, so if you want
to add individual files, binaries, requirement files etc you can add them there. The
<code class="docutils literal notranslate"><span class="pre">docker-context-files</span></code> is copied to the <code class="docutils literal notranslate"><span class="pre">/docker-context-files</span></code> folder of the build segment of the
image, so it is not present in the final image - which makes the final image smaller in case you want
to use those files only in the <code class="docutils literal notranslate"><span class="pre">build</span></code> segment. You must copy any files from the directory manually,
using COPY command if you want to get the files in your final image (in the main image segment).</p></li>
</ul>
</div>
</div>
<div class="section" id="more-details">
<h2>More details<a class="headerlink" href="#more-details" title="Permalink to this heading"></a></h2>
<div class="section" id="build-args-reference">
<h3>Build Args reference<a class="headerlink" href="#build-args-reference" title="Permalink to this heading"></a></h3>
<p>The detailed <code class="docutils literal notranslate"><span class="pre">--build-arg</span></code> reference can be found in <a class="reference internal" href="build-arg-ref.html"><span class="doc">Image build arguments reference</span></a>.</p>
</div>
<div class="section" id="the-architecture-of-the-images">
<h3>The architecture of the images<a class="headerlink" href="#the-architecture-of-the-images" title="Permalink to this heading"></a></h3>
<p>You can read more details about the images - the context, their parameters and internal structure in the
<a class="reference external" href="https://github.com/apache/airflow/blob/main/IMAGES.rst">IMAGES.rst</a> document.</p>
</div>
</div>
</div>
<div class="pager" role="navigation" aria-label="related navigation">
<a rel="prev" title="Docker Image for Apache Airflow" href="index.html" >
<button class="btn-hollow btn-blue bodytext__medium--cerulean-blue" accesskey="p">Previous</button>