Answer the question
In order to leave comments, you need to log in
docker-compose specifying env for dockerfile?
Good afternoon! Perhaps I'm dumb, but I can't figure out how to specify the environment variables that are described in .env during assembly to compose? There is the following Dockerfile building postgres:
FROM postgres:11
RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && echo $TZ > /etc/timezone
RUN localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8
COPY ./setup.sh /docker-entrypoint-initdb.d/init-user-db.sh
Answer the question
In order to leave comments, you need to log in
Looked bad:
version: '3.1'
services:
someservice:
env_file: .env
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question