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

YARN_CACHE_FOLDER in Dockerfile is not actually used #3712

Closed
Neurone opened this issue May 28, 2024 · 0 comments
Closed

YARN_CACHE_FOLDER in Dockerfile is not actually used #3712

Neurone opened this issue May 28, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Neurone
Copy link
Contributor

Neurone commented May 28, 2024

Problem description

The YARN_CACHE_FOLDER is defined in the services' Dockerfile but it's not actually used during the build process.
This prevents the correct overriding of that variable from the outside CLI. This happens for all the services.

Side note: for some reason, while building on MacOS using /root/.yarn as ID of the cache results in errors during the building of the services. Overriding that variable with any other ID, e.g., /root/yarn allows the build process to finish correctly.

Step to reproduce

Steps to reproduce the behavior:

  1. Run the build process for any service, e.g., the logger-service, using:

docker compose build logger-service

  1. Check the line

=> CACHED [logger-service interfaces 3/3] RUN --mount=type=cache,target=/root/.yarn yarn install --frozen-lockfile && yarn pack

and verify the target is set to the default value /root/.yarn

  1. Run the build process overriding the YARN_CACHE_FOLDER variable:

docker compose build logger-service --build-arg YARN_CACHE_FOLDER=/root/yarn

  1. Check the target is still /root/.yarn

=> CACHED [logger-service interfaces 3/3] RUN --mount=type=cache,target=/root/.yarn yarn install --frozen-lockfile && yarn pack

Expected behavior

The value of the target changes accordingly to the YARN_CACHE_FOLDER variable's value.

Screenshots

N/A

@Neurone Neurone added the bug Something isn't working label May 28, 2024
@Neurone Neurone changed the title YARN_CACHE_FOLDER in Docker file is not actually used YARN_CACHE_FOLDER in Dockerfile is not actually used May 28, 2024
Neurone added a commit to Neurone/guardian that referenced this issue May 28, 2024
Signed-off-by: Giuseppe Bertone <[email protected]>
Neurone added a commit to Neurone/guardian that referenced this issue May 28, 2024
Signed-off-by: Giuseppe Bertone <[email protected]>
This was referenced May 28, 2024
Neurone added a commit to Neurone/guardian that referenced this issue Jun 3, 2024
Signed-off-by: Giuseppe Bertone <[email protected]>
Neurone added a commit to Neurone/guardian that referenced this issue Jun 5, 2024
Signed-off-by: Giuseppe Bertone <[email protected]>
@Neurone Neurone linked a pull request Jun 5, 2024 that will close this issue
2 tasks
Neurone added a commit to Neurone/guardian that referenced this issue Jun 12, 2024
Signed-off-by: Giuseppe Bertone <[email protected]>
Neurone added a commit to Neurone/guardian that referenced this issue Jul 1, 2024
Signed-off-by: Giuseppe Bertone <[email protected]>
Neurone added a commit to Neurone/guardian that referenced this issue Jul 10, 2024
Signed-off-by: Giuseppe Bertone <[email protected]>
Neurone added a commit to Neurone/guardian that referenced this issue Jul 30, 2024
Signed-off-by: Giuseppe Bertone <[email protected]>
Neurone added a commit to Neurone/guardian that referenced this issue Aug 9, 2024
Signed-off-by: Giuseppe Bertone <[email protected]>
@Pyatakov Pyatakov mentioned this issue Aug 21, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants