Hi, I#m pretty new on docker and tried to install an OAuth-Server (Authelia). But the container can’t use the binded volumes/configuration. I’m already in contact with the team, but they can not find any errors sor far. The configuration, the way I mount the volume, the folder structure and permissions are fine. But when I start the container with docker compose, authelia can’t read the configuration or can’t even find them. I have tested it on two servers and both give the same error. Maybe someone here has experinced an similiar error already and can give some advise. Would be great.
This is the docker-compose.yml
version: '3.7'
services:
authelia:
image: authelia/authelia
container_name: authelia
restart: unless-stopped
# security_opt:
# - no-new-privileges:true
networks:
- web
volumes:
- ./authelia:/var/lib/authelia
# - ./configuration.yml:/etc/authelia/configuration.yml:ro
# - ./users_database.yml:/etc/authelia/users_database.yml
- ./config:/etc/authelia
environment:
- TZ=$TZ
labels:
- 'traefik.enable=true'
# HTTP Routers
- 'traefik.http.routers.authelia-rtr.entrypoints=https'
- 'traefik.http.routers.authelia-rtr.rule=Host(`secure.$DOMAINNAME`)'
- 'traefik.http.routers.authelia-rtr.tls=true'
- 'traefik.http.routers.authelia-rtr.tls.certresolver=le'
# Middlewares
- 'traefik.http.routers.authelia-rtr.middlewares=chain-no-auth@file'
# HTTP Service
- 'traefik.http.routers.authelia-rtr.service=authelia-svc'
- 'traefik.http.services.autheliavc.loadbalancer.server.port=9091'
networks:
web:
external: true
this is the docker inspect
[
{
"Id": "66c5a974079b0753ef9c4e961b75d87eb014d3d09a7d9e731c3a6d40eabd7840",
"Created": "2020-05-31T04:51:55.605426502Z",
"Path": "./authelia",
"Args": [
"--config",
"/etc/authelia/configuration.yml"
],
"State": {
"Status": "restarting",
"Running": true,
"Paused": false,
"Restarting": true,
"OOMKilled": false,
"Dead": false,
"Pid": 0,
"ExitCode": 2,
"Error": "",
"StartedAt": "2020-05-31T04:52:09.246717779Z",
"FinishedAt": "2020-05-31T04:52:09.462319597Z"
},
"Image": "sha256:65b87b65ec3f5ad916eee25cd561e87e09e11c94146d7af5f594af013d09979b",
"ResolvConfPath": "/var/lib/docker/containers/66c5a974079b0753ef9c4e961b75d87eb014d3d09a7d9e731c3a6d40eabd7840/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/66c5a974079b0753ef9c4e961b75d87eb014d3d09a7d9e731c3a6d40eabd7840/hostname",
"HostsPath": "/var/lib/docker/containers/66c5a974079b0753ef9c4e961b75d87eb014d3d09a7d9e731c3a6d40eabd7840/hosts",
"LogPath": "/var/lib/docker/containers/66c5a974079b0753ef9c4e961b75d87eb014d3d09a7d9e731c3a6d40eabd7840/66c5a974079b0753ef9c4e961b75d87eb014d3d09a7d9e731c3a6d40eabd7840-json.log",
"Name": "/authelia",
"RestartCount": 7,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/home/admin/docker/authelia/config:/etc/authelia:rw",
"/home/admin/docker/authelia/authelia:/var/lib/authelia:rw"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "web",
"PortBindings": {},
"RestartPolicy": {
"Name": "unless-stopped",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": [],
"CapAdd": null,
"CapDrop": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "shareable",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/eeabd496830bbd67df638a6d546b2eeeefa04f664a0138b1b3ec18f53b6eaf49-init/diff:/var/lib/docker/overlay2/d4ac5480e643de9c7eb2bcb0ea4ecb86d49399f055714f14a3d733964bf31f9e/diff:/var/lib/docker/overlay2/a8fdaeb21cf6f6a9349e5d3774d93bc761a93bd7ef320a6a613fe5f98059fc64/diff:/var/lib/docker/overlay2/551168b9026140d92d804b3cb8073e78ba8fdea75d5f256f3d5af9675f58a8e3/diff:/var/lib/docker/overlay2/5b2e8cf57e390c383aa277ceec0aee194f47d20bf0b288fbb677d646045d6dde/diff",
"MergedDir": "/var/lib/docker/overlay2/eeabd496830bbd67df638a6d546b2eeeefa04f664a0138b1b3ec18f53b6eaf49/merged",
"UpperDir": "/var/lib/docker/overlay2/eeabd496830bbd67df638a6d546b2eeeefa04f664a0138b1b3ec18f53b6eaf49/diff",
"WorkDir": "/var/lib/docker/overlay2/eeabd496830bbd67df638a6d546b2eeeefa04f664a0138b1b3ec18f53b6eaf49/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/home/admin/docker/authelia/config",
"Destination": "/etc/authelia",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/home/admin/docker/authelia/authelia",
"Destination": "/var/lib/authelia",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
}
],
"Config": {
"Hostname": "66c5a974079b",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"9091/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"TZ=Europe\\Berlin",
"PATH=/usr/app:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"./authelia",
"--config",
"/etc/authelia/configuration.yml"
],
"Image": "authelia/authelia",
"Volumes": {
"/etc/authelia": {},
"/var/lib/authelia": {}
},
"WorkingDir": "/usr/app",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "27ffa9f64a8320766885f968bd02db2ab2a884d47a5ab73fb9191cea386174af",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "authelia",
"com.docker.compose.project.config_files": "docker-compose.yml",
"com.docker.compose.project.working_dir": "/home/admin/docker/authelia",
"com.docker.compose.service": "authelia",
"com.docker.compose.version": "1.25.5",
"traefik.enable": "true",
"traefik.http.routers.authelia-rtr.entrypoints": "https",
"traefik.http.routers.authelia-rtr.middlewares": "chain-no-auth@file",
"traefik.http.routers.authelia-rtr.rule": "Host(`domain`)",
"traefik.http.routers.authelia-rtr.service": "authelia-svc",
"traefik.http.routers.authelia-rtr.tls": "true",
"traefik.http.routers.authelia-rtr.tls.certresolver": "le",
"traefik.http.services.autheliavc.loadbalancer.server.port": "9091"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "39db19c6b7ff1162c7f6a5d73d43b6d81343d7c481b462e34abfc0a22a85c98c",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "/var/run/docker/netns/39db19c6b7ff",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"web": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"authelia",
"66c5a974079b"
],
"NetworkID": "ca4f51b9c3450938353a2deab56ded13101b78c7784aa3ce0a350af0ef412334",
"EndpointID": "",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "",
"DriverOpts": null
}
}
}
}
]
And this is the error message
time="2020-05-26T17:25:41+02:00" level=error msg="Provide a JWT secret using \"jwt_secret\" key"
time="2020-05-26T17:25:41+02:00" level=error msg="Please provide `ldap` or `file` object in `authentication_backend`"
time="2020-05-26T17:25:41+02:00" level=error msg="Set domain of the session object"
time="2020-05-26T17:25:41+02:00" level=error msg="A storage configuration must be provided. It could be 'local', 'mysql' or 'postgres'"
time="2020-05-26T17:25:41+02:00" level=error msg="A notifier configuration must be provided"
panic: Some errors have been reported
goroutine 1 [running]:
main.startServer()
github.com/authelia/authelia/cmd/authelia/main.go:41 +0xc80
main.main.func1(0xc00009c000, 0xc000232120, 0x0, 0x2)
github.com/authelia/authelia/cmd/authelia/main.go:126 +0x20
github.com/spf13/cobra.(*Command).execute(0xc00009c000, 0xc000020190, 0x2, 0x2, 0xc00009c000, 0xc000020190)
github.com/spf13/cobra@v0.0.7/command.go:842 +0x29d
github.com/spf13/cobra.(*Command).ExecuteC(0xc00009c000, 0xc00013df58, 0x4, 0x4)
github.com/spf13/cobra@v0.0.7/command.go:943 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v0.0.7/command.go:883
main.main()
github.com/authelia/authelia/cmd/authelia/main.go:143 +0x166
Thanks in advanced.