You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
• Added architecture parameter support to Docker image building functions
• Set default architecture to pkgs.go.GOARCH for both generic and Go-specific builders
• Enhanced dockerImageFn and docker-image functions with arch configuration
• Improved cross-platform Docker image building capabilities
Changes walkthrough 📝
Relevant files
Enhancement
generic.nix
Add architecture parameter to generic Docker functions
lib/generic/generic.nix
• Added arch parameter with default value pkgs.go.GOARCH to dockerImageFn • Updated function calls to pass arch parameter to nix2container.buildImage • Enhanced docker-image function with architecture support
• Added arch parameter with default value pkgs.go.GOARCH to Go-specific dockerImageFn • Updated function signatures and calls to include architecture parameter • Enhanced Go Docker image building with cross-platform support
The default architecture value pkgs.go.GOARCH may not be appropriate for generic Docker images that are not Go-specific. Consider using a more generic default or making arch a required parameter.
Using pkgs.go.GOARCH as default for arch parameter creates an unnecessary dependency on Go packages even when Go is not used. Consider using pkgs.stdenv.hostPlatform.parsed.cpu.name or a more generic platform-specific default that doesn't require Go.
Why: Valid suggestion to remove unnecessary Go dependency in generic code. Using pkgs.stdenv.hostPlatform.parsed.cpu.name is more appropriate for generic Docker image building.
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
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.
PR Type
Enhancement
Description
• Added architecture parameter support to Docker image building functions
• Set default architecture to
pkgs.go.GOARCHfor both generic and Go-specific builders• Enhanced
dockerImageFnanddocker-imagefunctions with arch configuration• Improved cross-platform Docker image building capabilities
Changes walkthrough 📝
generic.nix
Add architecture parameter to generic Docker functionslib/generic/generic.nix
• Added
archparameter with default valuepkgs.go.GOARCHtodockerImageFn• Updated function calls to pass
archparameter tonix2container.buildImage• Enhanced
docker-imagefunction witharchitecture support
go.nix
Add architecture parameter to Go Docker functionslib/go/go.nix
• Added
archparameter with default valuepkgs.go.GOARCHtoGo-specific
dockerImageFn• Updated function signatures and calls to
include architecture parameter
• Enhanced Go Docker image building
with cross-platform support