TykTechnologies / tyk-gateway-docker

Docker compose deployment to run Tyk OSS Gateway
96 stars 80 forks source link

Docker-compose is broken as it expects "apps" to be a file, not a folder #50

Closed t-patt closed 3 years ago

t-patt commented 3 years ago

Cloning this repo and running docker-compose up -d fails because:

ERROR: for tyk-gateway-docker_tyk-gateway_1  Cannot start service tyk-gateway: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: rootfs_linux.go:60: mounting "/host_mnt/Users/me/workspace/tyk/tyk-gateway-docker/apps" to rootfs at "/var/lib/docker/overlay2/685a030b0618a20ba4ad5810a0989ecec6748cde11bccb49280cf32844582d89/merged/opt/tyk-gateway/apps" caused: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

Investigating further, the issue is because the the path specified in docker-compose (/opt/tyk-gateway/apps) is actually a file inside of this container, not a folder. But "apps" is a folder when cloning this as-is.

Inside the docker container:

root@b1138c98a19b:/opt/tyk-gateway# ls -lart
total 51068
-rw-r--r-- 1 root root      888 May  6 07:42 tyk.conf
-rw-r--r-- 1 root root      826 May  6 07:42 apps
-rwxr-xr-x 1 root root 52244752 May  6 07:43 tyk
drwxr-xr-x 2 root root     4096 May  6 07:46 templates

Easy enough to fix, but the README documentation is not accurate.

buger commented 3 years ago

Hi! It is a known issue with the latest docker image, which should be solved in next 2-3 days. For now, you can try to specify older tag instead of latest: 3.0.4, or 3.1.1

Thank you!

DeployInBinary commented 3 years ago

@t-patt Thanks for reporting this issue. This is now fixed in Tyk Gateway v3.2.1. Release notes can be found here: https://github.com/TykTechnologies/tyk/releases/tag/v3.2.1

t-patt commented 3 years ago

Thank you for the quick response and fix! Verified it is fixed now with latest docker image