The idea behind stateful apps is that they collect their data on the local file system. While you transfer an application to another machine, retrieving its data becomes difficult. Hence, it's better not to prefer running stateful apps on Docker.