'How to reset your App Engine standard docker image

I'm running a small app in a NodeJS14 App Engine standard environment. The app is currently only around 30MB in size, but the version in app engine is currently 530MB in size. This is because I accidentally included some dev dependencies in the final build of my app at one point. I fixed the issue, however, the version size has not decreased since that change.

My guess is the App Engine standard is simply creating new versions on an internal docker image, so that that one time 500MB build is sticking around. Is there any way to reset the internal docker image in App Engine standard?



Solution 1:[1]

  1. Redeploy your app as a different version

  2. Then go to https://console.cloud.google.com > App Engine > Versions and confirm that the new version is now serving your traffic

  3. Then delete the old version from the same UI

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 NoCommandLine