У меня есть docker-compose, который имеет 7 служб.
здесь:
version: '3'
networks: default:
external:
name: rss-network
volumes: shared-xml:
services: mysql:
image: db
hostname: mysql
build:
context: ./Database
dockerfile: Dockerfile
container_name: mysql
ports:
- "3306:3306"
- "33060:33060"
webui:
image: webui
build:
context: ./
dockerfile: Dockerfile.webui
container_name: webui
volumes:
- shared-xml:/rss
environment:
- "ConnectionString={$cstring}"
message.api:
image: message
build:
context: ./
dockerfile: Dockerfile.message
container_name: message
volumes:
- shared-xml:/rss
environment:
- "RabbitMq/Host={$host}"
- "token={$token}"
- "ConnectionString={$cstring}"
links:
- rabbit
depends_on:
- rabbit
rabbit:
image: rabbitmq:3.7.2-management
hostname: rabbit
container_name: rabbit
ports:
- "15672:15672"
- "5671:5671"
- "15671:15671"
- "5672:5672"
- "4369:4369"
tracker:
image: tracker
build:
context: ./
dockerfile: Dockerfile.tracker
container_name: tracker
environment:
- "RabbitMq/Host={$host}"
volumes:
- shared-xml:/rss
links:
- rabbit
- message.api
environment:
- "ConnectionString={$cstring}"
depends_on:
- mysql
botCenter:
image: botCenter
build:
context: ./
dockerfile: Dockerfile.botCenter
container_name: botCenter
environment:
- "ConnectionString={cstring}"
- "bot-token={$token}"
feeding:
image: feeder
build:
context: ./
dockerfile: Dockerfile.feeder
container_name: feeder
environment:
- "RabbitMq/Host={$host}"
volumes:
- shared-xml:/rss
links:
- rabbit
- message.api
после docker-compose --verbose build freeze here
...
Removing intermediate container b160ead77128
---> 6cce30feb98f
Successfully built 6cce30feb98f
Successfully tagged webui:latest
compose.cli.verbose_proxy.proxy_callable: docker close <- ()
compose.cli.verbose_proxy.proxy_callable: docker close -> None
compose.service.build: Building mysql
compose.cli.verbose_proxy.proxy_callable: docker build <- (path='C:\\Users\\TYılmaz\\Documents\\GitHub\\tracker\\RSSTracker\\Database', tag='db', rm=True, forcerm=False, pull=False, nocache=False, dockerfile='Dockerfile', cache_from=None, labels=None, buildargs={}, network_mode=None, target=None, shmsize=None, extra_hosts=None, container_limits={'memory': None})
docker.api.build._set_auth_headers: Looking for auth config
docker.auth.resolve_authconfig: Using credentials store "wincred"
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'https://index.docker.io/v1/'
docker.auth.resolve_authconfig: Using credentials store "wincred"
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'xmlparser.azurecr.io'
docker.api.build._set_auth_headers: Sending auth config ('https://index.docker.io/v1/', 'xmlparser.azurecr.io')
urllib3.connectionpool._make_request: http://localhost:None "POST /v1.25/build?t=db&q=False&nocache=False&rm=True&forcerm=False&pull=False&dockerfile=Dockerfile HTTP/1.1" 200 None
compose.cli.verbose_proxy.proxy_callable: docker build -> <generator object APIClient._stream_helper at 0x000002463460F8E0>
Step 1/6 : FROM mysql/mysql-server:latest
---> 02d081b9c73e
Step 2/6 : env MYSQL_USER=userid
---> Using cache
---> e0e302b9630d
Step 3/6 : env MYSQL_PASSWORD=pw
---> Using cache
---> 2e05dc0f1c59
Step 4/6 : env MYSQL_DATABASE=db
---> Using cache
---> 3184d46769f8
Step 5/6 : env MYSQL_RANDOM_ROOT_PASSWORD="w"
---> Using cache
---> 0aa292e5180f
Step 6/6 : ADD my.sql /docker-entrypoint-initdb.d
---> Using cache
---> c7afd14beb7a
Successfully built c7afd14beb7a
Successfully tagged db:latest
compose.cli.verbose_proxy.proxy_callable: docker close <- ()
compose.cli.verbose_proxy.proxy_callable: docker close -> None
compose.service.build: Building botCenter
compose.cli.verbose_proxy.proxy_callable: docker build <- (path='C:\\Users\\TYılmaz\\Documents\\GitHub\\tracker\\RSSTracker', tag='botCenter', rm=True, forcerm=False, pull=False, nocache=False, dockerfile='Dockerfile.botCenter', cache_from=None, labels=None, buildargs={}, network_mode=None, target=None, shmsize=None, extra_hosts=None, container_limits={'memory': None})
docker.api.build._set_auth_headers: Looking for auth config
docker.auth.resolve_authconfig: Using credentials store "wincred"
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'https://index.docker.io/v1/'
docker.auth.resolve_authconfig: Using credentials store "wincred"
docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'xmlparser.azurecr.io'
docker.api.build._set_auth_headers: Sending auth config ('https://index.docker.io/v1/', 'xmlparser.azurecr.io')
dockerКомпозит должен продолжать строить, но что-то не так, и я не понимаю, что не так.когда я собираю docker-compose, он замораживает сервис botCenter.другие службы четко работают.
вот мой dockerfile службы botCenter:
FROM microsoft/dotnet:2.0.0-sdk
WORKDIR /app
COPY *.sln ./
COPY ./BusinessLogic/*.csproj ./BusinessLogic/
COPY ./DataAccess/*.csproj ./DataAccess/
COPY ./Microservices/Message/*.csproj ./Microservices/Message/
COPY ./Microservices/Tracker/*.csproj ./Microservices/Tracker/
COPY ./Microservices/BotCenter/*.csproj ./Microservices/BotCenter/
COPY ./Microservices/Feeding/*.csproj ./Microservices/Feeding/
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o out
ENTRYPOINT ["dotnet", "Microservices/BotCenter//out/BotCenter.dll"]
этот файл docker успешно создается при использовании этой команды docker: "
dockerbuild -f dockerfile -t test2021.
"
помогите мне, пожалуйста.