docker image in docker compose code example
Example 1: docker compose
version: '2.0'
services:
web:
build: .
ports:
- "5000:5000"
volumes:
- .:/code
- logvolume01:/var/log
links:
- redis
redis:
image: redis
volumes:
logvolume01: {}
Example 2: docker compose exec compose
docker compose exec <your service name> <execute this command>