gzip compression on AWS

How can we enable gzip compression on AWS using a docker file for react js application?
We want to enable GZIP compression for artifacts flowing from Server to a browser.
In IIS we have used such a setting. But we are not aware of how to set this in Docker file in react js.

Source: StackOverflow