小编jra*_*er4的帖子

如何使用本地 nuget 包源进行 Dockerfile dotnet 还原

我正在尝试使用本地 nuget 包进行 dotnet 恢复,我尝试按照本教程进行操作:dotnet restore w/out internet

我的问题:

即使它存在于该路径上,它也看不到该路径。点击图片.

我使用的服务器位于公司网络上,这就是我无法使用 dotnet restore 的原因,所以我也遇到了与此链接类似的 nuget.org 问题。

环境:

对于示例项目,我使用了:

  • 来自 Visual Studio 2017 的基本 .Net Core Web 应用程序
  • Docker 企业版(无 UI),Windows 容器
  • Windows Server 2016 作为操作系统。

更新 10/15/2018

虽然@omajid 的回答非常有帮助,但我相信 docker volume mount 仅在使用 docker run 时才可能,不能在 Dockerfile(将用于构建管道)中使用。得到了与我想要实现的类似的链接。如何在 Docker 容器中挂载主机目录

docker .net-core dockerfile

5
推荐指数
1
解决办法
1万
查看次数

Kubernetes Pods 状态总是待定

请帮我。我正在遵循本指南:https : //pleasereleaseme.net/deploy-a-dockerized-asp-net-core-application-to-kubernetes-on-azure-using-a-vsts-ci-cd-pipeline-part -1/。我的 docker 镜像已成功构建并推送到我的私有容器注册表,我的 CD 管道也正常。但是当我尝试使用 kubectl get pods 检查它时,状态总是待定,当我尝试使用kubectl describe pod k8s-aspnetcore-deployment-64648bb5ff-fxg2k消息时:

Name:           k8s-aspnetcore-deployment-64648bb5ff-fxg2k
Namespace:      default
Node:           <none>
Labels:         app=k8s-aspnetcore
                pod-template-hash=2020466199
Annotations:    <none>
Status:         Pending
IP:
Controlled By:  ReplicaSet/k8s-aspnetcore-deployment-64648bb5ff
Containers:
  k8s-aspnetcore:
    Image:        mycontainerregistryb007.azurecr.io/k8saspnetcore:2033
    Port:         80/TCP
    Environment:  <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-tr892 (ro)
Conditions:
  Type           Status
  PodScheduled   False
Volumes:
  default-token-tr892:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-tr892
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  beta.kubernetes.io/os=windows
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s …
Run Code Online (Sandbox Code Playgroud)

kubernetes azure-pipelines-release-pipeline

2
推荐指数
1
解决办法
5173
查看次数