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 image locales error #1361

Closed
1 of 2 tasks
tristanrobert opened this issue Jan 6, 2025 · 3 comments
Closed
1 of 2 tasks

Docker build image locales error #1361

tristanrobert opened this issue Jan 6, 2025 · 3 comments
Assignees

Comments

@tristanrobert
Copy link
Contributor

Describe the current behavior

docker build -t grist:latest . exits 1 with error in line 36 in Dockerfile:

Error: ENOENT: no such file or directory, scandir '/grist/static/locales'
at Object.readdirSync (node:fs:1502:26)
at Object.<anonymous> (/grist/buildtools/sanitize_translations.js:19:23)
at Module._compile (node:internal/modules/cjs/loader:1565:14)
at Object..js (node:internal/modules/cjs/loader:1708:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/grist/static/locales'
}

Line 36 in Dockerfile: RUN yarn run build:prod calls buildtools/build.sh which calls sanitize_translations.js which needs /grist/static/locales which is not copied before.

Steps to reproduce

Describe the expected behavior

docker image built

Where have you encountered this bug?

Instance information (when self-hosting only)

  • Grist instance:

    • Version: latest
    • URL (if it's OK for you to share it):
    • Installation mode: docker
    • Architecture: single-worker
  • Browser name, version and platforms on which you could reproduce the bug:

  • Link to browser console log if relevant:

  • Link to server log if relevant:

@fflorent
Copy link
Collaborator

fflorent commented Jan 6, 2025

Thanks for the report @tristanrobert.

This seems related to a recent merge #1354.

cc @berhalak

tristanrobert added a commit to tristanrobert/grist-core that referenced this issue Jan 6, 2025
@paulfitz
Copy link
Member

paulfitz commented Jan 6, 2025

Oh yes, I see docker builds failing for some time https://github.com/gristlabs/grist-core/actions/workflows/docker_latest.yml

@berhalak berhalak self-assigned this Jan 7, 2025
paulfitz pushed a commit that referenced this issue Jan 7, 2025
## Context

Latest PR #1354 was breaking docker build and took the wrong approach for sanitizing translation files. More in the comments. 

## Proposed solution

1. Docker build was fixed by copying translation files sooner (just for validating them).
2. Build now only fails if some translations keys have values with invalid tags. Previously it was fixing them.

## Related issues

#1350
#1354
#1361

## Has this been tested?

<!-- Put an `x` in the box that applies: -->

- [x] 👍 yes, I added tests to the test suite
- [ ] 💭 no, because this PR is a draft and still needs work
- [ ] 🙅 no, because this is not relevant here
- [ ] 🙋 no, because I need help <!-- Detail how we can help you -->
@paulfitz
Copy link
Member

paulfitz commented Jan 8, 2025

We're so back. Thanks @tristanrobert @fflorent @berhalak !
Screenshot from 2025-01-08 09-11-49

@paulfitz paulfitz closed this as completed Jan 8, 2025
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

Successfully merging a pull request may close this issue.

4 participants