无法将“ update-ca-certificates”识别为内部或外部命令

时间:2020-04-14 07:32:46

标签: docker windows-10

在docker文件中,我有以下代码,尝试在docker中构建代码

  FROM microsoft/dotnet:2.1-sdk AS build

  ARG https_proxy
  ARG http_proxy

  ENV https_proxy $https_proxy
  ENV http_proxy $http_proxy

  EXPOSE 60717
  EXPOSE 5000
  EXPOSE 44356

  COPY tools/TestCertROOT.cer /usr/local/share/ca- certificates/TestCertROOT.crt
  RUN update-ca-certificates

当我做docker-compose时,我得到以下输出

 λ  docker-compose up
 Creating network "test-api_default" with the default driver
 Building api
 Step 1/22 : FROM microsoft/dotnet:2.2-sdk
 ---> f94ae7685e49
 Step 2/22 : ARG https_proxy
 ---> Using cache
 ---> 7d20c63454ff
 Step 3/22 : ENV https_proxy $https_proxy
 ---> Using cache
 ---> aba74e74813f
 Step 4/22 : ENV http_proxy $https_proxy
 ---> Using cache
 ---> 66c69a63f8cd
 Step 5/22 : ENV no_proxy 
 "db2,mainframe,localhost,.kaccess.net,.kaccess.com.au,.kmtltd.net.au,.compute.internal,.a- 
 **************************,git.caccess.net"
 ---> Using cache
 ---> 535f6fa37c2a
 Step 6/22 : COPY tools/TestCertROOT.cer /usr/local/share/ca-certificates/TestROOT.crt
 ---> Using cache
 ---> 1b25c7e4d7f1
 Step 7/22 : RUN update-ca-certificates
 ---> Running in 8c3ad5ed6117
 'update-ca-certificates' is not recognized as an internal or external command,
 operable program or batch file.
 ERROR: Service 'api' failed to build: The command 'cmd /S /C update-ca-certificates' returned a non- 
 zero code: 1

我已经安装了CA证书,但是仍然遇到相同的问题。

0 个答案:

没有答案