The problem is that /var/www doesn’t exist either, and mkdir isn’t recursive by default — it expects the immediate parent directory to exist.
Use:
mkdir -p /var/www/app
…or install a package that creates a /var/www prior to reaching this point in your Dockerfile.