Closed hexxone closed 1 year ago
Describe the bug
The $KIMAI Environment variable isn't correctly set, causing some errors to show up on Container startup.
With the latest image, when simply starting the Container, it will print out the following error:
/startup.sh: line 41: [: : integer expression expected /startup.sh: line 44: assets/monolog.yaml: No such file or directory
P.S.: In the UI of "Portainer", the $KIMAI variable also shows up as empty, which is weird because it shoule be set right here?.
$KIMAI
The only thing I could imagine being the issue is this: https://benkyriakou.com/posts/docker-args-empty
Because you are using a lot of "FROM" Steps, and not passing the argument through.
A Fix would be simply adding ARG KIMAI behind every new FROM .. AS statement.
ARG KIMAI
FROM .. AS
To Reproduce Steps to reproduce the behaviour:
docker logs kimai2
Running on a Server:
5.10.0-19-amd64
23.0.1, build a5ee5b1
Command used to run the container
Docker compose file (with passwords redacted)
timetrack_db: hostname: timetrack_db container_name: timetrack_db image: mysql:latest restart: unless-stopped networks: - tt_net environment: MYSQL_DATABASE: kimai MYSQL_USER: kimai MYSQL_PASSWORD: afdafadfadfadf MYSQL_ROOT_PASSWORD: sdfsdfsrf volumes: - ./kimai/database:/var/lib/mysql timetrack: hostname: timetrack container_name: timetrack image: kimai/kimai2:apache-latest restart: unless-stopped networks: - tt_net - web depends_on: - timetrack_db environment: APP_ENV: prod ADMINMAIL: admin@testsite.com ADMINPASS: 24556435456235 DATABASE_URL: mysql://root:sdfsdfsrf@timetrack_db/kimai memory_limit: 2048 labels: traefik.enable: true # HTTP -> HTTPS traefik.http.routers.timetrack-redirect.entrypoints: web traefik.http.routers.timetrack-redirect.rule: Host(`time.${HOST}`) traefik.http.routers.timetrack-redirect.middlewares: httpsredirect@docker # HTTPS -> Entry router traefik.http.routers.timetrack.entrypoints: websecure traefik.http.routers.timetrack.rule: Host(`time.${HOST}`) traefik.http.routers.timetrack.tls: true traefik.http.routers.timetrack.tls.certresolver: cfresolver traefik.http.routers.timetrack.middlewares: limit@docker,error-pages@docker traefik.http.routers.timetrack.service: timetrack # # Entry traefik.http.services.timetrack.loadbalancer.server.port: 8001 traefik.http.services.timetrack.loadbalancer.server.scheme: http traefik.http.services.timetrack.loadbalancer.passHostHeader: true volumes: - ./kimai/apache2.conf:/etc/apache2/onlySaml.conf - ./kimai/local.yaml:/opt/kimai/config/packages/local.yaml
Additional context Tell me if you need some more infos :)
Fixxed with PR
Describe the bug
The $KIMAI Environment variable isn't correctly set, causing some errors to show up on Container startup.
With the latest image, when simply starting the Container, it will print out the following error:
P.S.: In the UI of "Portainer", the
$KIMAI
variable also shows up as empty, which is weird because it shoule be set right here?.The only thing I could imagine being the issue is this: https://benkyriakou.com/posts/docker-args-empty
Because you are using a lot of "FROM" Steps, and not passing the argument through.
A Fix would be simply adding
ARG KIMAI
behind every newFROM .. AS
statement.To Reproduce Steps to reproduce the behaviour:
docker logs kimai2
Running on a Server:
5.10.0-19-amd64
23.0.1, build a5ee5b1
Command used to run the container
Docker compose file (with passwords redacted)
Additional context Tell me if you need some more infos :)