diff --git a/docker/w9deployment/Dockerfile b/docker/w9deployment/Dockerfile index 2e3fe17c..dd1d5a59 100644 --- a/docker/w9deployment/Dockerfile +++ b/docker/w9deployment/Dockerfile @@ -10,5 +10,4 @@ FROM portainer/portainer-ce:2.19.0 LABEL maintainer="websoft9" LABEL version="2.19.0" COPY --from=builder /init_portainer / - ENTRYPOINT ["/init_portainer"] \ No newline at end of file diff --git a/docker/w9deployment/docker-compose.yml b/docker/w9deployment/docker-compose.yml index 25768cca..ef678a41 100644 --- a/docker/w9deployment/docker-compose.yml +++ b/docker/w9deployment/docker-compose.yml @@ -6,7 +6,6 @@ services: portainer: container_name: websoft9-deployment image: websoft9dev/deployment:2.19.0 - entrypoint: ["/init_portainer"] restart: always ports: - 9001-9999:9000 diff --git a/docker/w9deployment/init_portainer.go b/docker/w9deployment/init_portainer.go index 5bf50e75..eb5662ba 100644 --- a/docker/w9deployment/init_portainer.go +++ b/docker/w9deployment/init_portainer.go @@ -32,6 +32,7 @@ func main() { _, err := os.Stat(filePath) if os.IsNotExist(err) { + fmt.Println("credential is not exist, create it.") password := generatePassword(16) err := writeToFile(filePath, password) @@ -40,6 +41,7 @@ func main() { return } }else{ + fmt.Println("credential is exist, skip it.") cmd := exec.Command("./portainer") cmd.Run() }