feat: Support offline Docker builds and image exports for air-gapped environments#2111
Open
wbg1991 wants to merge 1 commit intothingsboard:masterfrom
Open
feat: Support offline Docker builds and image exports for air-gapped environments#2111wbg1991 wants to merge 1 commit intothingsboard:masterfrom
wbg1991 wants to merge 1 commit intothingsboard:masterfrom
Conversation
- Added Dockerfile.offline to bundle all dependencies during build. - Updated .dockerignore to include requirements-full.txt in build context. - Introduced --offline flag for pre-installed dependency builds. - Introduced --save flag to export images as tar.gz for restricted networks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces support for building and exporting Docker images designed specifically for air-gapped (closed-network) environments.
While the repository currently provides .deb installers for offline deployment, there is a growing demand for containerized deployments even in restricted environments for better orchestration and maintenance. This update bridge that gap by providing a native Docker-based offline workflow.
Changes:
New Dockerfile.offline: Uses requirements-full.txt instead of the standard requirements to pre-install all connector dependencies during the build stage.
.dockerignore Update: Modified to include requirements-full.txt in the build context so it can be accessed by the offline Dockerfile.
--offline Flag: Added to the build script to trigger the build using the offline-ready Dockerfile.
--save Flag: Added to allow users to export the built image directly into a .tar.gz archive, making it easy to transfer to servers without internet access.
Why this is needed:
In many enterprise or high-security production environments, direct internet access is prohibited. While .deb packages work, many modern infrastructures prefer Docker for consistency. These changes allow users to build a "heavy" image once in a networked environment and deploy it seamlessly in a fully offline environment.