Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support docker offline install #423

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

631068264
Copy link
Contributor

Support docker offline install for private cloud which can't connect network.

@631068264
Copy link
Contributor Author

@JacieChao Please review my code.Thanks.

Name: "docker-arg",
P: &p.DockerArg,
V: p.DockerArg,
Usage: "Parameter for docker script",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to give an example of how to set args.
Parameters for docker install script, e.g. xxxxxx

@@ -39,7 +39,8 @@ type Metadata struct {
InstallScript string `json:"k3s-install-script,omitempty" yaml:"k3s-install-script,omitempty"`
Mirror string `json:"k3s-install-mirror,omitempty" yaml:"k3s-install-mirror,omitempty"`
DockerMirror string `json:"dockerMirror,omitempty" yaml:"dockerMirror,omitempty"`
DockerScript string `json:"dockerScript,omitempty" yaml:"dockerScript,omitempty"`
DockerArg string `json:"docker-arg,omitempty" yaml:"docker-arg,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to set multiple parameters?
Maybe there's no more than one arg for docker installation, would it be property to use StringArray instead of string?

Copy link
Contributor Author

@631068264 631068264 Mar 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example

install_docker.sh

P3=${P1}/${P2}

cmd

--docker-arg 'P1="xxxx" P2="xxxx"'

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the example description to dockerArg CLI usage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add more description for dockerArg , please check.

Copy link
Collaborator

@JacieChao JacieChao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JacieChao
Copy link
Collaborator

JacieChao commented Mar 29, 2022

@631068264 Please update the commit message with feat(autok3s): support offline installation of docker.
Thanks!

@631068264
Copy link
Contributor Author

Ok already been updated

@JacieChao
Copy link
Collaborator

@631068264 Thanks for the PR!

@JacieChao JacieChao merged commit 80b5961 into cnrancher:master Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants