Skip to content

install: add Tencent Cloud package mirror - #579

Open
soulteary wants to merge 3 commits into
docker:masterfrom
soulteary:feat/tencent-cloud-mirror
Open

soulteary wants to merge 3 commits into
docker:masterfrom
soulteary:feat/tencent-cloud-mirror

Conversation

@soulteary

Copy link
Copy Markdown

Target

PR body

Summary

Add TencentCloud to the existing --mirror option, using
https://mirrors.cloud.tencent.com/docker-ce as the package mirror.

This provides the same convenient interface as Aliyun and AzureChinaCloud:

sudo sh install.sh --mirror TencentCloud

Motivation

The existing DOWNLOAD_URL mechanism already allows this mirror to be selected.
A dry run supplied by the reporter on a Tencent Cloud host running Ubuntu 26.04
produces the expected Ubuntu GPG-key URL and the resolute stable APT source.
Adding a named preset avoids requiring users to remember and pass the full URL.

The reported output is a dry run, not evidence of a completed package installation.

Changes

  • Add the TencentCloud mirror preset.
  • Update the script header, --help output, and unknown-mirror error message.
  • Document package mirrors, dry runs, repository-only setup, and DOWNLOAD_URL.
  • Add 13 offline dry-run regression scenarios and run them in the existing CI workflow.

Default downloads, existing mirror presets, supported distributions, package
selection, and service behavior remain unchanged. An explicit --mirror retains
its existing precedence over DOWNLOAD_URL. This does not configure Docker Hub
registry mirrors, add cloud-provider detection, or add TencentOS support.

Validation

  • sh -n install.sh and sh -n scripts/test-mirrors.sh pass.
  • All 13 regression scenarios pass on the local Debian 13 environment with dash,
    Bash, and BusyBox ash as the installer shell (39 successful scenarios).
  • The tests fail at TencentCloud against the unchanged upstream installer,
    demonstrating that they detect the missing feature.
  • All 13 scenarios also pass in an isolated, mocked Ubuntu 26.04 OS fixture.
    Its dry run preserves the signed-by setting and generates the expected
    Tencent Cloud GPG URL and resolute stable repository. This fixture is not
    a real Ubuntu cloud VM or a package-installation integration test.

Not performed: installation on a Tencent Cloud VM, live mirror/package checks,
or the full upstream make shellcheck / make test suite. Docker and ShellCheck
are not available in the local execution environment. No GitHub Actions runs
were returned for the commit when checked after pushing.

Contribution

The single commit includes:

Signed-off-by: Su Yang <soulteary@users.noreply.github.com>

Add --mirror TencentCloud using the existing DOWNLOAD_URL mechanism and
https://mirrors.cloud.tencent.com/docker-ce. Update the usage text,
unknown-mirror diagnostic, and README with mirror selection examples.

Add offline dry-run regression tests for the default URL, existing
mirrors, environment-variable compatibility and precedence, supported
option combinations, help output, and invalid mirror names. Run these
tests in the existing CI workflow.

Signed-off-by: Su Yang <soulteary@users.noreply.github.com>
@742764146

742764146 commented Oct 5, 2026 via email

Copy link
Copy Markdown

Keep mirror argument and dry-run coverage network-free in a dedicated CI
job, with guarded download/package/service commands and explicit offline
result labels. Test the live check's opt-in and argument guards offline.

Add an opt-in Ubuntu/Debian network smoke check for manual execution on a
Tencent Cloud VM using the VPC private-network route. Skip before any
network access unless explicitly enabled; fail on request/content errors.
Do not install packages, follow redirects, disable TLS verification, or
silently fall back to another mirror.

Document VPC DNS, private-network validation, smoke-test limits and fresh-VM
installation acceptance. Clarify that the chosen mirror domain is a unified
public/private domain, rather than claiming it is universally intranet-only.

Validated locally: 54 offline assertions across dash, bash and BusyBox ash;
27 mock-transport cases; syntax/YAML checks; swallowed-downloader mutation.
No live Tencent Cloud requests or installation validation performed.

Signed-off-by: Su Yang <soulteary@users.noreply.github.com>
Remove the extra shift from the valueless --setup-repo option. The loop
already consumes that option, so the additional shift discards the next
argument. In particular, --setup-repo --dry-run loses dry-run protection
and may execute prerequisite installation and repository configuration.

Add 17 offline parser regression scenarios and a dedicated sh/bash CI
workflow. Execute only the real argument parser and mirror/channel
validation, never installation functions, including on the buggy baseline.
Keep the regression fix isolated from the TencentCloud preset so it can
be reviewed or cherry-picked independently.

Validated locally: 17 parser and 18 existing mirror scenarios under sh,
bash, and BusyBox ash on each of the TencentCloud and fork-main baselines
(210 successful scenario executions). Both unpatched baselines fail the
new dry-run-order regression. Shell syntax and YAML checks also passed.
No live Tencent Cloud connectivity or installation validation performed.

Signed-off-by: Su Yang <soulteary@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants