I would like to build a new image in my docker compose project using a git repository as I need to change some ARG vars.
My concern is that the Dockerfile is inside a folder of the git repository.
How can be specified a folder as build context using a git repository?
Repository: https://github.com/wodby/drupal-php/blob/master/7/Dockerfile
version: "2"
services:
php:
build:
context: https://github.com/wodby/drupal-php.git
dockerfile: 7/Dockerfile
args:
- BASE_IMAGE_TAG=7.1
- WODBY_USER_ID=117
- WODBY_GROUP_ID=111
volumes:
- ./:/var/www/html
I've tried the dockerfile property: "FOLDER/" + Dockerfile
But the repository uses relative paths, and it doesn't find dependencies:
---> 6cc2006e9102
Step 7/9 : COPY templates /etc/gotpl/
ERROR: Service 'phpe' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder740707850/templates: no such file or directory