question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cache not being utilized when called through Docker build

See original GitHub issue

I’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:closed
  • Created a year ago
  • Comments:18

github_iconTop GitHub Comments

1reaction
StevenMatchettcommented, Jul 11, 2022

@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

1reaction
fox1tcommented, Jul 11, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found