SAP / openui5-sample-app

OpenUI5 Sample App
https://sap.github.io/openui5-sample-app/
Apache License 2.0
279 stars 215 forks source link

Cannot access the application when hooking the source code into a container of docker #57

Closed lenient closed 5 years ago

lenient commented 5 years ago

I'm using the command below to link my local source code into a container of docker, docker run -p 8080:8080 -v $(pwd):/var/www -w "/var/www" node npm start

And it returns the following logs in the console,

> openui5-sample-app@0.2.0 start /var/www
> ui5 serve

WARN types:library:LibraryFormatter Failed to detect namespace or namespace is empty for project themelib_sap_fiori_3. Check verbose log for details.
Server started
URL: http://localhost:8080

But I cannot access the http://localhost:8080, it shows failed.

Any ideas?

RandomByte commented 5 years ago

Hey @lenient,

By default, the UI5 Tooling server only listens to connections from localhost. Since you are connecting to the server from outside the docker container, you need to pass the --accept-remote-connections to the ui5 serve command as documented here.

Try the following:

docker run -p 8080:8080 -v $(pwd):/var/www -w "/var/www" node npm start -- --accept-remote-connections