Fix Kong permission denied error in entrypoint
Build and Push Docker Images / build-portal (push) Successful in 2m9s Details
Build and Push Docker Images / build-infra (docker/db, monacousa-db) (push) Successful in 1m8s Details
Build and Push Docker Images / build-infra (docker/kong, monacousa-kong) (push) Successful in 25s Details
Build and Push Docker Images / build-infra (docker/migrate, monacousa-migrate) (push) Successful in 1m10s Details

- Add chown to give kong user write permissions to /var/lib/kong
- Fixes 'can't create /var/lib/kong/kong.yml: Permission denied' error
- Allows entrypoint script to generate kong.yml from template

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Matt 2026-02-10 14:05:13 +01:00
parent 92476902cf
commit fa99cda157
1 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,10 @@ FROM kong:2.8.1
USER root
COPY kong.yml.template /var/lib/kong/kong.yml.template
COPY --chmod=755 docker-entrypoint-wrapper.sh /docker-entrypoint-wrapper.sh
# Give kong user write permissions to /var/lib/kong so it can generate kong.yml
RUN chown -R kong:kong /var/lib/kong
USER kong
ENTRYPOINT ["/docker-entrypoint-wrapper.sh"]