diff --git a/docker/w9deploy/Dockerfile b/docker/w9deploy/Dockerfile index d3427c12..c87af473 100644 --- a/docker/w9deploy/Dockerfile +++ b/docker/w9deploy/Dockerfile @@ -9,4 +9,5 @@ RUN chmod +x /init_portainer FROM portainer/portainer-ce:2.19.0 LABEL maintainer="websoft9" LABEL version="2.19.0" + COPY --from=builder /init_portainer / \ No newline at end of file diff --git a/docker/w9deploy/init_portainer.go b/docker/w9deploy/init_portainer.go index c1c8dfb6..aff28ca2 100644 --- a/docker/w9deploy/init_portainer.go +++ b/docker/w9deploy/init_portainer.go @@ -10,7 +10,8 @@ import ( ) func main() { - filePath := "/var/websoft9/portainer_password" + + filePath := "/var/websoft9/credential" _, err := os.Stat(filePath) if os.IsNotExist(err) { @@ -32,7 +33,7 @@ func main() { fmt.Println("-----portainer_admin_user: admin, portainer_admin_password: " + string(content) + " ------") // call portainer - cmd := exec.Command("./portainer", "--admin-password-file", "/portainer_password") + cmd := exec.Command("./portainer", "--admin-password-file", filePath) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr