Flashcards
5 Docker compose
Flashcards do conjunto (17)
- 1When do we need docker compose?if we need a set of complex application running multiple services
- 2What is name of configuration file created with docker compose?docker-compose.yml
- 3What is command to bring up entire application stackdocker-compose up
- 4The following several slides relates to voting app Run redis container in background and name it redisdocker run -d --name=redis redis
- 5Run postgresql container in background and name it redisdbdocker run -d --name=db postgres:9.4
- 6Run voting-app container in background and name it vote and map port 5000 to 80docker run -d --name=vote -p 5000:80 voting-app
- 7Run result-app container in background and name it result and map port 5001 to 80docker run -d --name=result -p 5001:80 result-app
- 8Run worker container in background and name it workerdocker run -d --name=worker worker
- 9Why there will be a problem when we try run apps?We have not actually linked containers together - we haven't told voting application to use particular redis instance
- 10Link voting app container to redisdocker run -d --name=vote -p 5000:80 --link redis:redis voting-app
- 11Link result app to database containerdocker run -d --name=result -p 5001:80 --link db:db result-app
- 12Add links to db and redis in worker containerdocker run -d --name=worker --link db:db --link redis:redis worker
- 13Create docker- compose filedo it in word and practice looking at video
10:05 - 14Some images are not built. For example replace image: voting_app to buildbuild: ./vote
- 15What is difference between version2 and version 1 of docker-compose.yml1. version: 2 is indicated on top
2. all containers must be under services:
3. links are not needed - 16Add front-end and backend network line to docker-compose.ymlnetwork:
front-end:
back-end: - 17What should be added to version 3 of docker file to correct db error?environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Informações
- Descrição
- Easy Kodekloud Docker basics FlashCards sobre 5 Docker compose, criado por Archimed Nemes em 22-12-2022.
- Criado por
- Archimed Nemes
- Visualizações
- 0
- Avaliação