You have to add it in build section.
So, you can specify different alternative dockerfiles for each service.
services:
service1:
build:
context: .
args:
- NODE_ENV=local
dockerfile: Dockerfile_X
ports:
- "8765:8765"