Instead of including gcc and everything required to compile all our dependencies we could probably build a smaller image which would have a smaller attack surface.
https://docs.docker.com/develop/develop-images/multistage-build/#before-multi-stage-builds