mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 09:20:20 +08:00
portainer
This commit is contained in:
parent
0220641c0c
commit
5528e054cd
@ -1,4 +1,4 @@
|
|||||||
# modify time: 202407291102, you can modify here to trigger Docker Build action
|
# modify time: 202412061629, you can modify here to trigger Docker Build action
|
||||||
# step1: Build entrypoint execute program init_portainer by golang
|
# step1: Build entrypoint execute program init_portainer by golang
|
||||||
|
|
||||||
FROM golang:latest AS builder
|
FROM golang:latest AS builder
|
||||||
|
@ -31,7 +31,7 @@ type Credentials struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
// 检查初始化标志文件是否存在
|
||||||
initFlagExists := fileExists(initFlagFilePath)
|
initFlagExists := fileExists(initFlagFilePath)
|
||||||
credentialFileExists := fileExists(credentialFilePath)
|
credentialFileExists := fileExists(credentialFilePath)
|
||||||
|
|
||||||
@ -82,6 +82,13 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func fileExists(filePath string) bool {
|
||||||
|
if _, err := os.Stat(filePath); err == nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func startPortainer() {
|
func startPortainer() {
|
||||||
cmd := exec.Command("/portainer")
|
cmd := exec.Command("/portainer")
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
|
Loading…
Reference in New Issue
Block a user