Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container does not start because node cannot be found #10195

Closed
MartijnVdS opened this issue Nov 5, 2024 · 9 comments
Closed

Docker container does not start because node cannot be found #10195

MartijnVdS opened this issue Nov 5, 2024 · 9 comments
Assignees
Labels
docker Pull requests that update Docker code type: regression

Comments

@MartijnVdS
Copy link

MartijnVdS commented Nov 5, 2024

Q&A (please complete the following information)

  • OS: Linux
  • Browser: n/a
  • Version: n/a
  • Method of installation: Docker container
  • Swagger-UI version: 5.18.0
  • Swagger/OpenAPI version: n/a

Describe the bug you're encountering

Start the swagger-ui docker container for 5.18.0 with default settings does not work and immediately quits with an error.

To reproduce...

Steps to reproduce the behavior:

  1. Run docker run --rm -ti swaggerapi/swagger-ui:v5.18.0
  2. See error message:
$ docker run --rm -ti swaggerapi/swagger-ui:v5.18.0
Unable to find image 'swaggerapi/swagger-ui:v5.18.0' locally
v5.18.0: Pulling from swaggerapi/swagger-ui
Digest: sha256:ddff5bb2d8580b999f3ee5a05ec46dedcf6dbb6c9f46f2f0250497c41b7de539
Status: Downloaded newer image for swaggerapi/swagger-ui:v5.18.0
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/40-swagger-ui.sh
/docker-entrypoint.d/40-swagger-ui.sh: line 8: node: not found

Expected behavior

I expect the docker image to work in its default configuration.

Screenshots

Previous versions work correctly:

$ docker run --rm -ti swaggerapi/swagger-ui:v5.17.14
Unable to find image 'swaggerapi/swagger-ui:v5.17.14' locally
v5.17.14: Pulling from swaggerapi/swagger-ui
Digest: sha256:cb968cc70260c6027b44f227d054a0f12381736e9ab628ef6b6070a19fdf2172
Status: Downloaded newer image for swaggerapi/swagger-ui:v5.17.14
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/40-swagger-ui.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/11/05 15:20:30 [notice] 1#1: using the "epoll" event method
2024/11/05 15:20:30 [notice] 1#1: nginx/1.26.0
2024/11/05 15:20:30 [notice] 1#1: built by gcc 13.2.1 20231014 (Alpine 13.2.1_git20231014) 
2024/11/05 15:20:30 [notice] 1#1: OS: Linux 6.6.51-0-virt
2024/11/05 15:20:30 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/11/05 15:20:30 [notice] 1#1: start worker processes
2024/11/05 15:20:30 [notice] 1#1: start worker process 56
2024/11/05 15:20:30 [notice] 1#1: start worker process 57
2024/11/05 15:20:30 [notice] 1#1: start worker process 58
2024/11/05 15:20:30 [notice] 1#1: start worker process 59
@MartijnVdS MartijnVdS changed the title Docker container does not contain node but docker/docker-entrypoint.d/40-swagger-ui.sh expects it to be there Docker container does not start because contain node cannot be found Nov 5, 2024
@MartijnVdS MartijnVdS changed the title Docker container does not start because contain node cannot be found Docker container does not start because node cannot be found Nov 5, 2024
@MartijnVdS
Copy link
Author

According to the documentation, running it in a container like this without further configuration is supposed to work: https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation/

@MartijnVdS
Copy link
Author

Could this be related: #10192

@jortkoopmans
Copy link

Just made the same report, also pointing to that commit.
Note that also latest image is affected.

@Exagone313
Copy link

Caused by d849b74

Seems like a breaking change to me.

@airtonzanon
Copy link

airtonzanon commented Nov 5, 2024

Having the same issue, any best practices to how to deal with it or it's a mistake?

@carlosmesquita
Copy link

Caused by d849b74

Seems like a breaking change to me.

Yes, that is for sure the cause. Removing node basically breaks usage of swagger-ui in containers.

@javac9
Copy link

javac9 commented Nov 5, 2024

Same problem here, hope it gets fixed soon

@char0n char0n self-assigned this Nov 5, 2024
@char0n char0n added type: regression docker Pull requests that update Docker code labels Nov 5, 2024
@char0n
Copy link
Member

char0n commented Nov 5, 2024

Hi everybody,

My fault. I've tested locally and I could execute node even without the explicit install. Obviously I did something wrong. Fix release is comming.

@char0n
Copy link
Member

char0n commented Nov 5, 2024

@char0n char0n closed this as completed Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Pull requests that update Docker code type: regression
Projects
None yet
Development

No branches or pull requests

7 participants