Skip to content

Commit

Permalink
fix: use the new docker container in install command
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKolarik committed Sep 30, 2024
1 parent ef7ddc9 commit 15463c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/install_probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (r *Root) RunInstallProbe(cmd *cobra.Command, args []string) {
func containerPullMessage(containerEngine probe.ContainerEngine) string {
pre := "The Globalping platform is a community powered project and relies on individuals like yourself to host our probes and make them accessible to everyone else.\n"
var mid string
post := "Please confirm to pull and run our Docker container (ghcr.io/jsdelivr/globalping-probe)"
post := "Please confirm to pull and run our Docker container (globalping/globalping-probe)"

if containerEngine == probe.ContainerEnginePodman {
mid = "We have detected that you are using podman, the 'sudo podman' command will be used to pull the container.\n"
Expand Down
2 changes: 1 addition & 1 deletion cmd/install_probe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func Test_Execute_Install_Probe_Docker(t *testing.T) {
assert.Equal(t, `Detected container engine: Docker
The Globalping platform is a community powered project and relies on individuals like yourself to host our probes and make them accessible to everyone else.
Please confirm to pull and run our Docker container (ghcr.io/jsdelivr/globalping-probe) [Y/n] The Globalping probe started successfully. Thank you for joining our community!
Please confirm to pull and run our Docker container (globalping/globalping-probe) [Y/n] The Globalping probe started successfully. Thank you for joining our community!
`, w.String())

expectedCtx := &view.Context{
Expand Down
4 changes: 2 additions & 2 deletions globalping/probe/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func inspectContainerPodman() error {
}

func runContainerDocker() error {
cmd := exec.Command("docker", "run", "-d", "--log-driver", "local", "--network", "host", "--restart", "always", "--name", "globalping-probe", "ghcr.io/jsdelivr/globalping-probe")
cmd := exec.Command("docker", "run", "-d", "--log-driver", "local", "--network", "host", "--restart", "always", "--name", "globalping-probe", "globalping/globalping-probe")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err := cmd.Run()
Expand All @@ -97,7 +97,7 @@ func runContainerDocker() error {
}

func runContainerPodman() error {
cmd := exec.Command("sudo", "podman", "run", "--cap-add=NET_RAW", "-d", "--network", "host", "--restart=always", "--name", "globalping-probe", "ghcr.io/jsdelivr/globalping-probe")
cmd := exec.Command("sudo", "podman", "run", "--cap-add=NET_RAW", "-d", "--network", "host", "--restart=always", "--name", "globalping-probe", "globalping/globalping-probe")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err := cmd.Run()
Expand Down

0 comments on commit 15463c0

Please sign in to comment.