mirror of
https://github.com/Icinga/docker-icingaweb2.git
synced 2025-10-24 21:40:59 +02:00
Create /var/lib/icingaweb2
This commit is contained in:
parent
101a4db635
commit
29513e761b
@ -28,6 +28,7 @@ RUN ["chmod", "-R", "u=rwX,go=rX", "/entrypoint-db-init"]
|
|||||||
RUN ["chmod", "o+x", "/var/log/apache2"]
|
RUN ["chmod", "o+x", "/var/log/apache2"]
|
||||||
RUN ["chown", "www-data:www-data", "/var/run/apache2"]
|
RUN ["chown", "www-data:www-data", "/var/run/apache2"]
|
||||||
RUN ["ln", "-vs", "/data/etc/icingaweb2", "/etc/icingaweb2"]
|
RUN ["ln", "-vs", "/data/etc/icingaweb2", "/etc/icingaweb2"]
|
||||||
|
RUN ["ln", "-vs", "/data/var/lib/icingaweb2", "/var/lib/icingaweb2"]
|
||||||
RUN ["install", "-o", "www-data", "-g", "www-data", "-d", "/data"]
|
RUN ["install", "-o", "www-data", "-g", "www-data", "-d", "/data"]
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint"]
|
ENTRYPOINT ["/entrypoint"]
|
||||||
|
|||||||
@ -40,9 +40,11 @@ func entrypoint() error {
|
|||||||
if os.Getpid() == 1 {
|
if os.Getpid() == 1 {
|
||||||
logf("info", "Initializing /data as we're the init process")
|
logf("info", "Initializing /data as we're the init process")
|
||||||
|
|
||||||
logf("debug", "Creating %#v", enModsDir)
|
for _, dir := range []string{enModsDir, "/data/var/lib/icingaweb2"} {
|
||||||
if errMA := os.MkdirAll(enModsDir, dirMode); errMA != nil {
|
logf("debug", "Creating %#v", dir)
|
||||||
return errMA
|
if errMA := os.MkdirAll(dir, dirMode); errMA != nil {
|
||||||
|
return errMA
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logf("debug", "Translating env vars to .ini config")
|
logf("debug", "Translating env vars to .ini config")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user