我有以下情况:
我有一个必须从net-core linux容器映像访问的Windows网络文件夹( microsoft / aspnetcore:2.0 )
我怎样才能做到这一点?我找不到有关码头工作量的更多信息。
这是我的dockercompose:
version: '3.1'
services:
acesso.bankreturn.service:
image: acesso.bankreturn.service
build:
context: .
dockerfile: Acesso.BankReturn.Service/Dockerfile
depends_on:
- db
- elk
secrets:
- BankReturnConnectionString
- DiItauCron
- DiItauDepositTypes
- DiItauErrorPath
- DiItauInputPath
- DiItauProcessingPath
- DiItauSuccessPath
- DiItauTemporaryPath
- ElkConnectionString
- ElkResourceName
- EmailSender
- EmailSenderName
- EmailSubject
- EmailToAddress
- RabbitHostName
- RabbitPassword
- RabbitQueue
- RabbitUserName
db:
image: microsoft/mssql-server-linux:2017-latest
environment:
- "ACCEPT_EULA=Y"
- "MSSQL_SA_PASSWORD=VcDERqwfaDs4bkEHDJ1H"
ports:
- "1433:1433"
elk:
image: sebp/elk:564
ports:
- "5601:5601"
- "9200:9200"
- "5044:5044"
secrets:
BankReturnConnectionString:
file: ./secrets/BankReturnConnectionString.txt
DiItauCron:
file: ./secrets/DiItauCron.txt
DiItauDepositTypes:
file: ./secrets/DiItauDepositTypes.txt
DiItauErrorPath:
file: ./secrets/DiItauErrorPath.txt
DiItauInputPath:
file: ./secrets/DiItauInputPath.txt
DiItauProcessingPath:
file: ./secrets/DiItauProcessingPath.txt
DiItauSuccessPath:
file: ./secrets/DiItauSuccessPath.txt
DiItauTemporaryPath:
file: ./secrets/DiItauTemporaryPath.txt
ElkConnectionString:
file: ./secrets/ElkConnectionString.txt
ElkResourceName:
file: ./secrets/ElkResourceName.txt
EmailSender:
file: ./secrets/EmailSender.txt
EmailSenderName:
file: ./secrets/EmailSenderName.txt
EmailSubject:
file: ./secrets/EmailSubject.txt
EmailToAddress:
file: ./secrets/EmailToAddress.txt
RabbitHostName:
file: ./secrets/RabbitHostName.txt
RabbitPassword:
file: ./secrets/RabbitPassword.txt
RabbitQueue:
file: ./secrets/RabbitQueue.txt
RabbitUserName:
file: ./secrets/RabbitUserName.txt
这是我的dockerfile:
FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY *.sln ./
COPY Acesso.BankReturn.Service/Acesso.BankReturn.Service.csproj Acesso.BankReturn.Service/
COPY Acesso.BankReturn.Infra.Service.Logger/Acesso.BankReturn.Infra.Service.Logger.csproj Acesso.BankReturn.Infra.Service.Logger/
COPY Acesso.BankReturn.Domain/Acesso.BankReturn.Domain.csproj Acesso.BankReturn.Domain/
COPY Acesso.BankReturn.Infra.Data/Acesso.BankReturn.Infra.Data.csproj Acesso.BankReturn.Infra.Data/
COPY Acesso.BankReturn.Infra.Service.Queue/Acesso.BankReturn.Infra.Service.Queue.csproj Acesso.BankReturn.Infra.Service.Queue/
COPY Acesso.BankReturn.Infra.CrossCutting.DTOs/Acesso.BankReturn.Infra.CrossCutting.DTOs.csproj Acesso.BankReturn.Infra.CrossCutting.DTOs/
COPY Acesso.BankReturn.Application/Acesso.BankReturn.Application.csproj Acesso.BankReturn.Application/
COPY Acesso.BankReturn.Infra.Service.Notificator/Acesso.BankReturn.Infra.Service.Notificator.csproj Acesso.BankReturn.Infra.Service.Notificator/
RUN dotnet restore
COPY . .
WORKDIR /src/Acesso.BankReturn.Service
RUN dotnet build -c Release -o /app
FROM build AS publish
RUN dotnet publish -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "Acesso.BankReturn.Service.dll"]
您有实施示例吗? 感谢。