mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 09:20:20 +08:00
websoft9
This commit is contained in:
parent
2f7e4bf546
commit
0220641c0c
@ -13,7 +13,7 @@ RUN chmod +x /init_portainer
|
|||||||
# Dockerfile refer to: https://github.com/portainer/portainer/blob/develop/build/linux/Dockerfile
|
# Dockerfile refer to: https://github.com/portainer/portainer/blob/develop/build/linux/Dockerfile
|
||||||
FROM portainer/portainer-ce:2.20.3
|
FROM portainer/portainer-ce:2.20.3
|
||||||
LABEL maintainer="websoft9<help@websoft9.com>"
|
LABEL maintainer="websoft9<help@websoft9.com>"
|
||||||
LABEL version="2.20.3"
|
LABEL version="2.20.3-rc1"
|
||||||
COPY --from=builder /init_portainer /
|
COPY --from=builder /init_portainer /
|
||||||
|
|
||||||
ENTRYPOINT ["/init_portainer"]
|
ENTRYPOINT ["/init_portainer"]
|
@ -31,9 +31,12 @@ type Credentials struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// 检查初始化标志文件是否存在
|
|
||||||
if _, err := os.Stat(initFlagFilePath); err == nil {
|
initFlagExists := fileExists(initFlagFilePath)
|
||||||
log.Println("Initialization has already been completed by another instance.")
|
credentialFileExists := fileExists(credentialFilePath)
|
||||||
|
|
||||||
|
if initFlagExists || credentialFileExists {
|
||||||
|
log.Println("Initialization has already been completed by another instance or credentials are present.")
|
||||||
startPortainer()
|
startPortainer()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user