turborepo-remote-cache: Cache not being utilized when called through Docker build

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?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20

Most upvoted comments

I still had the problem with the last updates.

❌ With the node:16-slim turbo was not fetching cache from the remote server.

✅ With node:16-alpine, it works

I do not know the reason, however it could be interesting to add it in the documentation 😃

@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.