docker-compose generates a container based on your original image. What is defined in your yml file is redis. After generation, redis is the alias of this container. You can just use the name redis directly. docker-compose exec redis bash into your redis container.
docker-compose generates a container based on your original image. What is defined in your yml file is redis. After generation, redis is the alias of this container. You can just use the name redis directly. docker-compose exec redis bash into your redis container.
In the above example, you don’t need to write ${DOCKER_USER}, just write nginx:2.11 at the end. The “:” is preceded by the name and followed by Tag.