You are likely thinking of Fury (2014), directed by David Ayer.
Brad Pitt stars as Sergeant Don "Wardaddy" Collier, commanding a Sherman tank crew (Shia LaBeouf, Logan Lerman, Michael Peña, Jon Bernthal) during the final Allied push into Nazi Germany, April 1945. Noted for gritty combat realism and tank interior cinematography.