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 build failing (command not found: ./scripts/update_adblock_hosts.sh) #883

Open
janwillemwilmsen opened this issue Jul 15, 2024 · 2 comments

Comments

@janwillemwilmsen
Copy link

Hi there,
Managed to get the Renderscript app working locally (after pulling the latest github version, and updating Playwright to the latest version, and commenting out // '--disk-cache-dir=/dev/null', in src/lib/browser/constants.ts, and switching to Node 18.18.2 ).

But when trying to create the Docker container I get errors saying :
RUN yarn build: 7.258 command not found: ./scripts/update_adblock_hosts.sh.

When building with this : "build": "yarn clean && yarn tsc" the container is created, but you get errors trying to run the container:
err: Error: Error while setting up adblocker at Adblocker.load (/app/renderscript/dist/lib/browser/Adblocker.js:27:42) at async Object.init (/app/renderscript/dist/lib/singletons.js:13:9) at async /app/renderscript/dist/index.js:58:5, extra: { err: [Error: ENOENT: no such file or directory, open '/app/renderscript/dist/lib/browser/adblock_hosts.txt'] { errno: -2, code: 'ENOENT', syscall: 'open', path: '/app/renderscript/dist/lib/browser/adblock_hosts.txt' } }

I tried to run the 'update_adblock_hosts.sh' script from within the container, but didn't work(permissions).
Do you have any suggestions on what to do?

@dylantientcheu
Copy link
Contributor

Hi @janwillemwilmsen

The latest version updates the build command to: yarn clean && yarn tsc && yarn browser:adblocks see here: https://github.com/algolia/renderscript/blob/master/package.json#L7

From the errors, it seems like the version you are trying to compile doesn't have the new build command. Make sure you are using the latest master branch.

As for the playwright and dependencies upgrades; it will be handled in this PR: #879

@janwillemwilmsen
Copy link
Author

Tnx for your answer @dylantientcheu
Did you manage to get the Docker running? I still keep getting the error.
But found different solution, am investigating now...

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

2 participants