小编Anj*_*yna的帖子

docker-desktop安装后在windows 10中找不到daemon.json文件

我使用安装程序在 Windows 10 中安装了 docker-desktop。现在我想查看配置文件 daemon.json。官方文档说

Windows 上配置文件的默认位置是 %programdata%\docker\config\daemon.json

但我找不到文件夹 %programdata%\docker。相反,文件夹 C:\ProgramData\DockerDesktop 存在。但是里面没有 daemon.json 文件。

有人可以帮我找出为什么会这样,我在哪里可以找到 daemon.json?

daemon docker windows-10 docker-for-windows

20
推荐指数
1
解决办法
9646
查看次数

如何使用 certbot 自动续订 TLS 证书?

我有一个带有 Nginx docker 容器的应用程序,在部署应用程序的主机(使用 Ubuntu 操作系统)中使用以下命令手动生成 TLS 证书:

certbot certonly --manual --manual-public-ip-logging-ok --preferred-challenges dns -d my.app.com
Run Code Online (Sandbox Code Playgroud)

当证书过期时,我必须更新它们。

但我不能certbot renew为此目的使用以下命令,因为它会给出错误:

$ sudo certbot renew

Failed to renew certificate my.app.com with error: The manual plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.')
Run Code Online (Sandbox Code Playgroud)

因此,我现在要做的是再次创建证书(使用certbot certonly之前使用的相同命令)而不是更新它们。

如何使用certbot renew命令修复错误?

我怎样才能自动化这个设置?

ubuntu manual ssl-certificate auto-renewing certbot

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

什么是 Windows 10 中的受管端口排除?

我在 Windows 10 中启用了 hyper-v。当我检查排除的端口时,我得到:

C:\> netsh interface ipv4 show excludedportrange protocol=tcp

Protocol tcp Port Exclusion Ranges

Start Port    End Port
----------    --------
      5357        5357
      9800        9800
      9801        9801
     49671       49770
     49871       49970
     50000       50059     *
     61117       61216
     61220       61319
     61902       62001

* - Administered port exclusions.
Run Code Online (Sandbox Code Playgroud)

为什么 Hyper-V 保留这些端口?

受管端口排除(即范围 50000-50059 )与其他端口排除有何不同?

例如,当我尝试在 golang 中使用 net.Listen() ping 所有这些端口时,除 50000-50059 之外的所有端口都返回错误:

listen tcp 127.0.0.1:9801: bind: An attempt was made to access a socket in a way forbidden by its access …
Run Code Online (Sandbox Code Playgroud)

hyper-v windows-10 docker-for-windows

8
推荐指数
1
解决办法
4385
查看次数

在 Azure 管道作业之间共享文件

在 Azure 管道的文档中,我读到:

每个代理一次只能运行一项作业。要并行运行多个作业,您必须配置多个代理。

在自托管代理上运行管道时,默认情况下,在两次连续运行之间不会清除任何子目录。因此,您可以进行增量构建和部署,前提是已实现任务以利用它。您可以使用作业的工作区设置覆盖此行为。

管道工件提供了一种在管道中的阶段之间或不同管道之间共享文件的方法。它们通常是需要由另一个作业使用或部署的构建过程的输出。

作为初学者,看完这篇,我有一些疑惑:

  1. 如果我在 azure-pipelines.yaml 中有 2 个作业(第 2 个作业在第 1 个之后运行),这两个作业会在同一个代理中运行吗?同一管道中的不同作业是否共享可通过变量引用的同一工作区Pipeline.Workspace?(很明显,在并行作业运行的情况下,它需要多个代理)。
  2. 第一项工作一步生成一些文件。是否可以在不使用工件的情况下在第二个作业中使用这些文件(通常使用工件,第一个作业发布工件,第二个作业下载它)?

可以请一些人帮我清除这些疑虑吗?

jobs artifacts agent azure-pipelines

7
推荐指数
1
解决办法
2129
查看次数

$头盔版本显示“无法连接到分er”

我使用游民机创建了kubernetes集群3并安装了头盔。但是,当检查头盔的版本时,它会给出客户端的版本,并显示“无法连接到耕er机。由于与转发端口有关的错误,我无法使用头盔安装任何图表。

vagrant@master:~$ helm init

$HELM_HOME has been configured at /home/vagrant/.helm.
Warning: Tiller is already installed in the cluster.
(Use --client-only to suppress this message, or --upgrade to upgrade Tiller to the current version.)
Happy Helming!

vagrant@master:~$ helm version

Client: &version.Version{SemVer:"v2.6.2", GitCommit:"be3ae4ea91b2960be98c07e8f73754e67e87963c", GitTreeState:"clean"}
Error: cannot connect to Tiller

vagrant@master:~$ helm install nginx

Error: forwarding ports: error upgrading connection: unable to upgrade connection: pod does not exist
Run Code Online (Sandbox Code Playgroud)

我在这里找到了解决方案:

https://kubernetes.io/docs/getting-started-guides/ubuntu/troubleshooting/

这是由于API负载平衡器未在舵机客户端-服务器关系的上下文中转发端口而引起的。

但是解决该错误的过程对我来说并不明确。

例如,第一步说要公开Kubernetes Master服务:

   juju expose kubernetes-master
Run Code Online (Sandbox Code Playgroud)

但是我用kubectl代替了juju。那么,如何找到k8s主服务的名称?以及如何使用kubectl执行此步骤?

简而言之,我想使用kubectl而不是juju来执行步骤,而且我不明白其中的区别。

谁能帮我?

vagrant kubernetes kubernetes-helm

5
推荐指数
0
解决办法
2272
查看次数

错误:此应用程序需要 jre 1.6.0

我的 Windows 10 计算机中有一个应用程序 emSignerGSTN。但是在尝试运行该应用程序时,我收到错误:

This application requires a jre 1.6.0
Run Code Online (Sandbox Code Playgroud)

我有 Azul Zulu 的 openjdk 安装:

$ java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (Zulu 8.40.0.25-CA-win64) (build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (Zulu 8.40.0.25-CA-win64) (build 25.222-b10, mixed mode)

$ where java
C:\Program Files\Zulu\zulu-8\bin\java.exe
Run Code Online (Sandbox Code Playgroud)

oracle java 安装使应用程序可以运行。但我不想安装它。我该如何解决这个问题?

java windows

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

为 docker 服务安装本地卷时出错

我正在 OCI 的 ubuntu 实例中部署应用程序。

我有一个 docker-compose 文件,其中包含为此指定的卷。顶层有一个卷规范,并且在服务下的嵌套级别中提到了该命名卷:

version: '3.2'
services:
  minio:
    image: minio/minio
    restart: always
    command: server /data
    ports:
    - 9200:9000
    volumes:
    - minio-data:/data

volumes:
  minio-data:
    driver_opts:
      type: none
      device: /mydir/data/minio-data
      o: bind
Run Code Online (Sandbox Code Playgroud)

但是当执行 docker-compose up 时,它无法启动容器并出现错误:

Creating docker_minio_1    ... error

ERROR: for minio  Cannot start service minio: error while mounting volume '/var/lib/docker/volumes/docker_minio-data/_data': failed to mount local volume: mount /mydir/data/minio-data:/var/lib/docker/volumes/docker_minio-data/_data, flags: 0x1000: no such file or directory

ERROR: Encountered errors while bringing up the project.
Run Code Online (Sandbox Code Playgroud)

但如果我按照以下方式进行操作,它就会起作用:

version: '3.2'
services: …
Run Code Online (Sandbox Code Playgroud)

ubuntu mount docker docker-volume minio

5
推荐指数
0
解决办法
2073
查看次数

在 WSL 中运行 shell 脚本时出现“E: Invalid operation update”错误

我有一个名为的 shell 脚本setup_wsl.sh,其中包含:

#!/bin/bash

echo "hai"
sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"  
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
Run Code Online (Sandbox Code Playgroud)

当我在 WSL 中将脚本作为 ./setup_wsl.sh 运行时(安装的发行版是 ubuntu 18.04),会出现以下错误:

hai
E: Invalid operation update
E: Unable to locate package
./setup_wsl.sh: 4: ./setup_wsl.sh: apt-transport-https: not found
./setup_wsl.sh: …
Run Code Online (Sandbox Code Playgroud)

sudo file sh windows-subsystem-for-linux ubuntu-18.04

4
推荐指数
2
解决办法
7511
查看次数

当 Minikube 集群安装在 WSL2 中时,无法访问已部署的服务

我在 Windows 10 专业版的 WSL 2 中设置了 Minikube 集群,其中 docker-for-windows 与 WSL2 集成一起使用。Minikube 使用默认的 docker 驱动程序启动。

\n
$ minikube version\nminikube version: v1.25.2\ncommit: 362d5fdc0a3dbee389b3d3f1034e8023e72bd3a7\n
Run Code Online (Sandbox Code Playgroud)\n

如果我遵循入门指南,在创建hellow-minikube服务后,我应该能够通过<minikube-ip>:nodeport或 通过minikube service命令连接到该服务。

\n

但第一种方法没有成功。因为甚至无法从 WSL 2 ping minikube ip:\n(这适用于纯 Ubuntu 安装上的 Minikube 设置。问题出在 WSL2 - Linux 的 Windows 子系统中)。

\n
$ minikube ip\n192.168.49.2\n\n$ ping 192.168.49.2\nPING 192.168.49.2 (192.168.49.2) 56(84) bytes of data.\n^C\n--- 192.168.49.2 ping statistics ---\n293 packets transmitted, 0 received, 100% packet loss, time 303708ms\n
Run Code Online (Sandbox Code Playgroud)\n

第二种方法minikube …

service kubernetes windows-10 minikube wsl-2

3
推荐指数
1
解决办法
7130
查看次数