portainer

This commit is contained in:
qiaofeng1227 2023-09-18 09:43:03 +08:00
parent 011a85368e
commit e4f5694729
2 changed files with 4 additions and 2 deletions

View File

@ -9,4 +9,5 @@ RUN chmod +x /init_portainer
FROM portainer/portainer-ce:2.19.0
LABEL maintainer="websoft9<help@websoft9.com>"
LABEL version="2.19.0"
COPY --from=builder /init_portainer /

View File

@ -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