I'm trying to speed up spinning up docker by having all current packages in yarn.lock be installed on the image already. I think I'm doing yarn install incorrectly, that it is working somewhere else?
relevant part of dockerfile:
# Create a dir
WORKDIR /(WORKDIR)
# Time to install all our dependencies
COPY package.json /(WORKDIR)/package.json
COPY yarn.lock /(WORKDIR)/yarn.lock
# Need the executables to be in the path
ENV PATH /(WORKDIR)/node_modules/.bin:$PATH
RUN yarn check --verify-tree || yarn install --frozen-lockfile
I think my last line is incorrect. It is installing somewhere, but not on the package itself? Either that or caching might be an issue. If I start the image I find the output of yarn check --verify-tree
is still the current state of the image.