Fantasy-Fit / fantasy-fit-web

Creative Commons Zero v1.0 Universal
3 stars 2 forks source link

Reduce size of Docker images #172

Closed chris-t-li closed 1 year ago

chris-t-li commented 1 year ago

Currently, there is a lot of bloat in the dockerfiles which is:

  1. Taking a long time to build each time;
  2. Large image sizes (1.07GB for Rails and 1.26GB for React);

Screen Shot 2023-06-06 at 11 44 14 PM

Action to reduce docker image sizes by:

  1. Using alpine versions of Ruby, Node, Postgres
  2. Use multi-stage build for React and Rails

With most recent commit 4644bb89a909c2d47d2379558b476651aad6a68e (#170) took ~ 180 seconds to build

Screen Shot 2023-06-06 at 11 45 11 PM

chris-t-li commented 1 year ago

In addition, stopping the client service typically takes a long time. ~ 10+ seconds

Screen Shot 2023-06-06 at 11 48 52 PM

chris-t-li commented 1 year ago

Closed with PR #173