(chore) Remove docker installation ++#7173
Merged
awesomenix merged 1 commit intomasterfrom Oct 14, 2025
Merged
Conversation
8b7cf97 to
eeba501
Compare
Contributor
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
Contributor
Author
|
@microsoft-github-policy-service agree |
117e455 to
111b749
Compare
111b749 to
27ca518
Compare
27ca518 to
ddc0a49
Compare
5 tasks
1fdce0b to
fa01ba4
Compare
fa01ba4 to
d3746ff
Compare
d3746ff to
10ac38f
Compare
10ac38f to
7e155c2
Compare
Contributor
Author
|
Main pipeline is green this PR is ready for merge |
cameronmeissner
approved these changes
Oct 14, 2025
… 1.24. This change removes all Docker-related installation, configuration, and runtime code from AgentBaker, as containerd is now the only supported container runtime. **aks-node-controller/helpers/utils.go** - Removed conditional logic for dockerShim flag removal - Now unconditionally removes dockerShim flags since Docker is no longer supported - Flags removed: `--cni-bin-dir`, `--cni-cache-dir`, `--cni-conf-dir`, `--docker-endpoint`, `--image-pull-progress-deadline`, `--network-plugin`, `--network-plugin-mtu` **pkg/agent/baker.go** - Applied same unconditional dockerShim flag removal in `ValidateAndSetLinuxNodeBootstrappingConfiguration()` - Removed unused `profile` variable after eliminating containerd runtime check - Removed template functions: `IsDockerContainerRuntime` and `RequiresDocker` - Added comments explaining Docker removal in Kubernetes 1.24 **parts/linux/cloud-init/artifacts/cse_config.sh** - Removed `ensureDocker()` function (lines 414-432) - Function was responsible for starting Docker service and configuring daemon.json **parts/linux/cloud-init/artifacts/cse_main.sh** - Removed conditional Docker/containerd runtime selection - Now always calls `ensureContainerd` since it's the only supported runtime - Removed Docker login logic for private registry authentication - Private registry auth is now handled through containerd configuration **parts/linux/cloud-init/artifacts/cse_cmd.sh** - Removed `NEEDS_DOCKER_LOGIN` template variable - Variable was used to determine if Docker login was needed for private registries **parts/linux/cloud-init/artifacts/cse_install.sh** - Removed call to `installMoby()` in `installContainerRuntime()` - Added shellcheck directive for `cleanupImagesRun()` function (unrelated fix) **pkg/agent/datamodel/types.go** - `NeedsContainerd()` method already updated to always return `true` - `RequiresDocker()` method already deprecated and always returns `false` - Both methods kept for backwards compatibility with clear deprecation comments **pkg/agent/datamodel/types_test.go** - Updated `TestHasContainerd` to expect `true` for all runtime configurations - Updated test cases for Docker, empty string, and unexpected runtime values - Updated `TestKubernetesConfig_RequiresDocker` to expect `false` for all cases - Added explanatory comments about Kubernetes 1.24 Docker removal - Regenerated all snapshot test data via `make generate` - All Go tests pass successfully with new Docker-removed logic The following kubelet flags were part of dockershim and are no longer valid: - `--cni-bin-dir`: CNI binary directory - `--cni-cache-dir`: CNI cache directory - `--cni-conf-dir`: CNI configuration directory - `--docker-endpoint`: Docker endpoint socket - `--image-pull-progress-deadline`: Image pull progress deadline - `--network-plugin`: Network plugin type - `--network-plugin-mtu`: Network plugin MTU - **Before**: Conditional logic checked `ContainerRuntime` config to decide between Docker and containerd - **After**: Containerd is always used as the container runtime - **Private Registry Auth**: Moved from `docker login` to containerd registry configuration The following Docker/Moby-related code remains but is no longer called: - `installMoby()` function in `parts/linux/cloud-init/artifacts/ubuntu/cse_install_ubuntu.sh` - `removeMoby()` function in `parts/linux/cloud-init/artifacts/ubuntu/cse_install_ubuntu.sh` - `ensureRunc()` function still exists (used by containerd) These can be removed in a follow-up cleanup PR if desired. - ✅ All Go unit tests pass - ✅ Datamodel tests updated and passing - ✅ Test data regenerated successfully - ✅ Shellcheck validation passes (warnings are pre-existing style issues unrelated to this change) - Kubernetes 1.24 removed dockershim: https://kubernetes.io/blog/2022/05/03/dockershim-historical-context/ - Docker/containerd migration: https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/ This change: - Simplifies the codebase by removing Docker-specific logic - Aligns with Kubernetes 1.24+ which only supports containerd (and CRI-compatible runtimes) - Reduces maintenance burden by removing deprecated code paths - Has no functional impact on AKS nodes as Docker has not been supported since Kubernetes 1.24 --- **Breaking Change**: This removes support for Docker runtime configurations. All clusters must use containerd (which has been the default and only supported runtime since Kubernetes 1.24).
7e155c2 to
df5a93e
Compare
cameronmeissner
approved these changes
Oct 14, 2025
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.
What type of PR is this?
/kind cleanup
/kind deprecation
What this PR does / why we need it:
Docker and dockershim were removed from Kubernetes in version 1.24. This change removes all Docker-related installation, configuration, and runtime code from AgentBaker, as containerd is now the only supported container runtime.
aks-node-controller/helpers/utils.go
--cni-bin-dir,--cni-cache-dir,--cni-conf-dir,--docker-endpoint,--image-pull-progress-deadline,--network-plugin,--network-plugin-mtupkg/agent/baker.go
ValidateAndSetLinuxNodeBootstrappingConfiguration()profilevariable after eliminating containerd runtime checkIsDockerContainerRuntimeandRequiresDockerparts/linux/cloud-init/artifacts/cse_config.sh
ensureDocker()function (lines 414-432)parts/linux/cloud-init/artifacts/cse_main.sh
ensureContainerdsince it's the only supported runtimeparts/linux/cloud-init/artifacts/cse_cmd.sh
NEEDS_DOCKER_LOGINtemplate variableparts/linux/cloud-init/artifacts/cse_install.sh
installMoby()ininstallContainerRuntime()cleanupImagesRun()function (unrelated fix)pkg/agent/datamodel/types.go
NeedsContainerd()method already updated to always returntrueRequiresDocker()method already deprecated and always returnsfalsepkg/agent/datamodel/types_test.go
Updated
TestHasContainerdto expecttruefor all runtime configurationsUpdated test cases for Docker, empty string, and unexpected runtime values
Updated
TestKubernetesConfig_RequiresDockerto expectfalsefor all casesAdded explanatory comments about Kubernetes 1.24 Docker removal
Regenerated all snapshot test data via
make generateAll Go tests pass successfully with new Docker-removed logic
The following kubelet flags were part of dockershim and are no longer valid:
--cni-bin-dir: CNI binary directory--cni-cache-dir: CNI cache directory--cni-conf-dir: CNI configuration directory--docker-endpoint: Docker endpoint socket--image-pull-progress-deadline: Image pull progress deadline--network-plugin: Network plugin type--network-plugin-mtu: Network plugin MTUBefore: Conditional logic checked
ContainerRuntimeconfig to decide between Docker and containerdAfter: Containerd is always used as the container runtime
Private Registry Auth: Moved from
docker loginto containerd registry configurationThe following Docker/Moby-related code remains but is no longer called:
installMoby()function inparts/linux/cloud-init/artifacts/ubuntu/cse_install_ubuntu.shremoveMoby()function inparts/linux/cloud-init/artifacts/ubuntu/cse_install_ubuntu.shensureRunc()function still exists (used by containerd)These can be removed in a follow-up cleanup PR if desired.
✅ All Go unit tests pass
✅ Datamodel tests updated and passing
✅ Test data regenerated successfully
✅ Shellcheck validation passes (warnings are pre-existing style issues unrelated to this change)
Kubernetes 1.24 removed dockershim: https://kubernetes.io/blog/2022/05/03/dockershim-historical-context/
Docker/containerd migration: https://kubernetes.io/docs/tasks/administer-cluster/migrating-from-dockershim/
This change:
Which issue(s) this PR fixes:
Fixes #
Requirements:
Special notes for your reviewer:
This removes support for Docker runtime configurations. All clusters must use containerd (which has been the default and only supported runtime since Kubernetes 1.24).
Release note: