-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
337a0d5
commit e23030e
Showing
11 changed files
with
218 additions
and
129 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,31 @@ | ||
# docker-install | ||
|
||
install | ||
### Install | ||
install docker from url: | ||
```shell script | ||
docker-install install | ||
--host 172.16.213.131 | ||
--user root | ||
--passwd admin | ||
--registry 127.0.0.1 | ||
--docker-lib /var/lib/docker | ||
--pkg-url /root/docker-19.0.3.tgz | ||
``` | ||
|
||
uninstall | ||
### UnInstall | ||
uninstall docker: | ||
```shell script | ||
docker-install uninstall | ||
--host 172.16.213.131 | ||
--user root | ||
--passwd admin | ||
--docker-lib /var/lib/docker | ||
``` | ||
|
||
### Print Download Url | ||
print download url for docker: | ||
```shell script | ||
docker-install print | ||
``` | ||
|
||
the Newest version is v19.03.0. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package install | ||
|
||
import "testing" | ||
|
||
func Test_InstallDocker(t *testing.T) { | ||
User = "root" | ||
Passwd = "admin" | ||
host := "172.16.213.131" | ||
RegistryArr = []string{} | ||
DockerLib = "/var/lib/docker" | ||
tarDocker(host) | ||
configDocker(host) | ||
enableDocker(host) | ||
versionDocker(host) | ||
} | ||
|
||
func Test_UnInstallDocker(t *testing.T) { | ||
User = "root" | ||
Passwd = "admin" | ||
host := "172.16.213.131" | ||
DockerLib = "/var/lib/docker" | ||
uninstallDocker(host) | ||
versionDocker(host) | ||
} | ||
|
||
func Test_RegistryJoin(t *testing.T) { | ||
hosts := []string{"172.16.213.131", "172.16.213.131"} | ||
t.Log(registryJoin(hosts)) | ||
} | ||
|
||
func Test_DockerConfig(t *testing.T) { | ||
RegistryArr = []string{"127.0.0.1", "127.0.0.2"} | ||
DockerLib = "/var/lib/docker" | ||
s := dockerConfig(RegistryArr, DockerLib) | ||
t.Log(string(s)) | ||
} |
Oops, something went wrong.