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

macOS docker compatibility #734

Closed
juliusknorr opened this issue Jan 8, 2025 · 0 comments
Closed

macOS docker compatibility #734

juliusknorr opened this issue Jan 8, 2025 · 0 comments

Comments

@juliusknorr
Copy link
Contributor

Since nextcloud/docker-ci#658 we have an arm image available, now trying to run viewer tests with the docker setup I ran into a problem that the docker container ip on macOS is not accessible from the host system without port mapping.

Filing this issue to further investigate options. We probably should try to automatically map to a port and use that instead.

Manual viewer patch to make it work:

diff --git a/cypress.config.ts b/cypress.config.ts
index f46e87aa..e99358f6 100644
--- a/cypress.config.ts
+++ b/cypress.config.ts
@@ -77,10 +77,11 @@ export default defineConfig({

                        // Before the browser launches
                        // starting Nextcloud testing container
-                       const ip = await startNextcloud(process.env.BRANCH)
+                       const ip = await startNextcloud(process.env.BRANCH, true, {
+                               exposePort: 8082,
+                       })
                        // Setting container's IP as base Url
-                       config.baseUrl = `http://${ip}/index.php`
-                       await waitOnNextcloud(ip)
+                       config.baseUrl = `http://localhost:8082/index.php`
                        await configureNextcloud([]) // pass empty array as WE are already the viewer
                        return config
                },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant