I am trying to run a container. I already have the image uploaded to private Docker registry. I want to write a compose file to download and deploy the image. But I want to
In your docker-compose.yml file add
env_file:
- .env_file
to your db service where .env_file is your .env file (change its name accordingly).
version: '3'
services:
db:
#build: k-db
user: "1000:50"
volumes:
- /data/mysql:/var/lib/mysql
container_name: k-db
env_file:
- .env_file
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
image: XX:$KB_DB_TAG_VERSION
image: k-db
ports:
- "3307:3306"