Docker Community Forums

Share and learn in the Docker community.

Docker Compose file to Create a container with multiple Images


(Satishd1) #1

Docker Compose file to Create a container with multiple Images
I need to build a container using the following images.

Python
NoSQL
MongoDB
DotNetCore 2.0
I have created a docker-compose.yml file as below. Am trying to create one container for each image and do linking between the containers. But its failing can you please correct me the compose file.

Also after the container is created how can i check what are the images inside the container.


version: “2”

services:
phython:
image: python

mongo:
image: mongo
links:

  • phython:hub

nosql:
image: oracle/nosql
links:

  • phython:hub

dotnetcore:
image: microsoft/aspnetcore:2.0
links:

  • phython:hub

(David Maze) #2

docker ps will tell you. You should see four containers, one for each block in the Docker Compose YAML file. (But there shouldn’t be any surprises; it should exactly match what you wrote out there.)