Out of memory issue with "meteor build"

I use Elastic Beanstalk to deploy the meteor with single docker container, I could deploy it with t2.small instance before upgrading to meteor v1.7, but I am now getting “Out of memory” error during the “meteor build” process after upgrading.
Does anyone know how to setup the configuration for meteor build in the Dockerfile?

I had to remove the standard minifiers as a temp solution https://github.com/meteor/meteor/issues/9568#issuecomment-402575928