Access phpfpm inside docker container with nginx

Can the phpfpm inside the docker container be accessed from outside with nginx fastcgi_pass?

i have installed nginx on my ubuntu with apt install nginx and i’m want to configure nginx with phpfpm but phpfpm in docker container

docker-compose

version: "2"
services:
  phpfpm:
   image: bitnami/php-fpm:7.1
   container_name: "phpfpm_7.1"
   ports:
    - 9000:9000

   network_mode: "host"

   volumes:
    - ./tester/:/app

nginx config

location ~* .php$ {
                 fastcgi_param REQUEST_METHOD $request_method;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_nam$
                fastcgi_pass 127.0.0.1:9000;
}

try access file php in browser ,nginx say File not found.

Source: StackOverflow