I\'m using Docker and Docker-compose to build a stack of nginx+php.
I\'m trying to set the timezone in my .env
file and use it in a Dockerfile, but I mi
You need to pass the build argument in docker compose
version '2'
services:
php:
build:
dockerfile: php7-fpm
args:
TIMEZONE: ${TIMEZONE}
volumes:
- ${APP_PATH}:/var/www/app
- ./logs:/var/www/logs
The environment
are passed to the running container and not to the buildfile. For the you need to pass args
in the build
section