Cache not being utilized when called through Docker build
See original GitHub issueI’ve successfully cloned the turborepo-remote-cache
and I’ve hooked it up in AWS. Everything is working fine, up until I try to use the cache from docker. Here’s my dockerfile
:
FROM docker.artifactory.moveaws.com/node:16 as build
COPY . /app
WORKDIR /app
RUN yarn install
RUN yarn build
RUN npx turbo run build
Both RUN yarn build
and RUN npx turbo run build
are not updating the cache. Originally I thought that my docker instance couldn’t communicate with the deployed service, but when I added a CURL inside the container, I could verify that outbound calls are properly triggered.
My question is, has anyone run into this? Maybe someone has an example of a dockerfile
already out there? Or what could possibly be the issue that the commands won’t trigger the cache during the build phase?
Issue Analytics
- State:
- Created a year ago
- Comments:18
Top Results From Across the Web
Docker build is not using cache
From your Dockerfile, if you append lines to your Dockerfile, or change the code being built, there's only one line that could be...
Read more >WORKDIR causes docker build to not use cache #30081
Observe that there was no caching used. Describe the results you received: The results of two consecutive builds results in no caching in...
Read more >Optimizing builds with cache management
The only way to force a rebuild is by making sure that a layer before it has changed, or by clearing the build...
Read more >Docker build not using cache - GitLab Forum
I am trying to speed up my Docker build by using the --cache-from option. This works on my local machine but not on...
Read more >How the Docker Build Cache Works and When Not to Use It
This is the reason why docker build uses a cache. In this tutorial, we'll learn more about the build process and when it's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@fox1t I believe @mkotsollaris is referring to building a docker image that uses the remote-cache and not deploying the remote cache. I am also running into issues when trying to reach out to my deployed remote-cache. When docker is running a turbo command it is not using hosted remote cache
You can follow here https://github.com/fox1t/turborepo-remote-cache#deploy-on-docker You are not setting the vars.
You can also use the official image we pushed on docker hub.