Closed jorgetutor closed 6 years ago
Those are the build arguments, not environment variables for customization, you'll have to rebuild the image with these arguments.
This what I think I'm doing with the args property in the composer file, but it throws an exception. I'll open a new issue to cover that.
Ohh... I'm sorry, I missed that you're using build
. It seems the problem is that you're using an incorrect context, it should be a directory 7/
inside of the git repository, otherwise it can't find templates/
in your current context which is a git repo root.
How can I specify this using a git repository as context? I've set the Dockerfile like 7/Dockerfile but it doesn't work.
Which alternatives/workaround can I use? Thanks!
Found!
version: "2"
services:
php:
build:
context: https://github.com/wodby/drupal-php.git#:7
args:
- BASE_IMAGE_TAG=7.1
- WODBY_USER_ID=117
- WODBY_GROUP_ID=111
volumes:
- ./:/var/www/html
https://docs.docker.com/engine/reference/commandline/build/#git-repositories
Thanks!
One question, just to confirm. Is it possible to use the WODBY_USER_ID & GROUP with this image? If I want to change them Shall I need to use the original one (php)?
_One or more build-args [WODBY_USER_ID WODBY_GROUPID] were not consumed
Yes, WODBY_USER_ID
and WODBY_GROUP_ID
are build args
I see those args in the PHP docker image, not in the Drupal-PHP one. Does the Drupal-PHP image stores and uses those args over the PHP image? Sorry, I'm still new to Docker.
wodby/drupal-php images based on wodby/php as indicated in README.
This is why I think that the [WODBY_USER_ID WODBY_GROUP_ID] parameters are not available in the Drupal-PHP image, just in the main one (PHP). So if I want to change them I can't use the Drupal-PHP image Am I right?
If you want to change user and group ids in drupal-php image, you should build your own wodby/php image with the provided build args and then build your own drupal-php image based on your php.
Hi,
I would like to run drupal4docker inside Jenkins.
In my machine, Jenkins has the properties:
I have a permissions issue as the files being mounted into the docker image uses Jenkins user owner/group.
I've seen that the PHP base image are there two arguments that can be overridden:
So I've changed my composer-override to:
But when I run
docker-composer up -d
I getWhat am I doing wrong? Any other way to run this docker image using Jenkins user with files permission compatibility?
Thanks!