mirror of
https://github.com/Icinga/docker-icingaweb2.git
synced 2025-10-24 21:40:59 +02:00
parent
754762bcb7
commit
8de79895d0
@ -27,6 +27,8 @@ EXPOSE 8080
|
||||
|
||||
RUN ["chmod", "o+x", "/var/log/apache2"]
|
||||
RUN ["chown", "www-data:www-data", "/var/run/apache2"]
|
||||
RUN ["install", "-o", "www-data", "-g", "www-data", "-d", "/etc/icingaweb2"]
|
||||
RUN ["ln", "-vs", "/data/etc/icingaweb2", "/etc/icingaweb2"]
|
||||
RUN ["install", "-o", "www-data", "-g", "www-data", "-d", "/data"]
|
||||
|
||||
VOLUME ["/data"]
|
||||
ENTRYPOINT ["/entrypoint"]
|
||||
|
||||
@ -23,6 +23,15 @@ func entrypoint() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
if os.Getpid() == 1 {
|
||||
logf("info", "Initializing /data as we're the init process")
|
||||
|
||||
logf("debug", `Creating "/data/etc/icingaweb2"`)
|
||||
if errMA := os.MkdirAll("/data/etc/icingaweb2", 0750); errMA != nil {
|
||||
return errMA
|
||||
}
|
||||
}
|
||||
|
||||
path := os.Args[1]
|
||||
if filepath.Base(path) == path {
|
||||
logf("info", "Looking up %#v in $PATH", path)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user