I have a docker-compose.yml file which uses a few variables set in an .env file.
Is there an easy way to print the final version of the file, to check if everything was correctly replaced?
# .env
UBUNTU_VERSION=19.8
.
# docker-compose.yml
version: '3'
services:
myservice:
image: ubuntu:${UBUNTU_VERSION}
env-file:
- .env
Note:
Compose supports declaring default environment variables in an environment file named .env placed in the folder where the docker-compose
Documentation: https://docs.docker.com/compose/env-file/