0

I have a dockerfile that contains the following steps.

FROM ruby:2.4.5-slim
# more build steps
WORKDIR /app
COPY ./Gemfile ./Gemfile.lock ./package.json ./yarn.lock ./
RUN bundle install
RUN yarn install
COPY . .
RUN RAILS_ENV=production bin/rails assets:precompile --trace
# more build steps

Sometimes the assets will precompile perfectly within a few seconds, other times the precompilation times out. The timeout is consistent with certain builds only on Google Cloud Builder. If I restart a build that timesout, that build will timeout again. I am able to build the image without any issues on many different machines.

I've also been able to successfully run the cloubuild steps locally without any issues.

raman
  • 643
  • 7
  • 16
  • Have you tried increasing the timeout of the build? (https://cloud.google.com/cloud-build/docs/build-config#timeout_1). You may also wish to try a large (build) machine size (https://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes) – DazWilkin Feb 22 '19 at 17:49
  • @DazWilkin I have increased the timeout and tried different machines. and that has not helped either. It's a very small set of assets we use. When it does work (which is 90% of the time), it does not take any longer than fifteen seconds. – raman Feb 24 '19 at 15:40
  • Interesting. Do you have Google Cloud Support? If so, I recommend a ticket. If not, is there a way for me to easily repro your issue? If so, I will give it a whirl and, if I can repro it, I'll chat with Engineering. – DazWilkin Feb 24 '19 at 17:09

0 Answers0