Docker Compose: How to specify path to docker file while building as if in different directory?

This can be done like this, add build in docker-compose.yml and run the build from ABOVE directory:

version: '3.8'

services:
  your_service:
    build: # "context" and "dockerfile" fields have to be under "build"
      context: .
      dockerfile: <Below_Directory>/Dockerfile

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)