8wDlpd.png
8wDFp9.png
8wDEOx.png
8wDMfH.png
8wDKte.png

无法从 Docker 容器内访问以太网摄像头

user10627299 2月前

77 0

操作系统:Ubuntu 22.04.4 LTSPylon:pylon_7.5.0.15658-deb0_amd64 摄像头连接到以太网接口 enp0s31f6,该接口位于静态 ip 192.168.2.10/255.255.255.0 上。摄像头位于静态 ip 192....

操作系统:Ubuntu 22.04.4 LTS
塔:pylon_7.5.0.15658-deb0_amd64

摄像机连接到以太网接口, enp0s31f6 该接口使用静态 IP 192.168.2.10/255.255.255.0 。摄像机使用静态 IP 192.168.2.11/255.255.255.0 .

我构建了 pylon-ros-camera ,它成功检测到了相机enter image description here

但是,即使我成功地在 Docker 容器内构建了相同的包,它也无法检测到摄像头。

我尝试过

  • 为了让容器能够看到主机上的接口,我以网络方式运行容器 docker run --network=host -d myimage ... 。现在,如果我 ifconfig 在容器内运行,它会显示与主机上相同的接口。请参见 ifconfig 主机和容器内的输出。但是,它仍然无法检测到摄像头。
  • 我以扩展权限运行了容器 docker run --network=host --privileged -v /dev:/dev -d ... 。但是,它仍然无法检测到相机。

可能存在什么问题?

主机上的 IFCONFIG

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:cff:fe29:3048  prefixlen 64  scopeid 0x20<link>
        ether 02:42:0c:29:30:48  txqueuelen 0  (Ethernet)
        RX packets 602988  bytes 31801390 (31.8 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 701650  bytes 5591761213 (5.5 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.10  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::ada5:60b0:e461:3007  prefixlen 64  scopeid 0x20<link>
        ether 9c:6b:00:07:61:79  txqueuelen 1000  (Ethernet)
        RX packets 10880082  bytes 16425539680 (16.4 GB)
        RX errors 9  dropped 0  overruns 0  frame 9
        TX packets 54503  bytes 3794035 (3.7 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  memory 0x72500000-72520000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 240419  bytes 70007245 (70.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 240419  bytes 70007245 (70.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.19  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::40ef:b0b9:5215:18e7  prefixlen 64  scopeid 0x20<link>
        ether f0:b6:1e:a2:b6:92  txqueuelen 1000  (Ethernet)
        RX packets 6337099  bytes 8614290755 (8.6 GB)
        RX errors 0  dropped 6672  overruns 0  frame 0
        TX packets 1492973  bytes 542835548 (542.8 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

容器内的 IFCONFIG

root@docker-desktop:/home/basler_ws# ifconfig
br-aa73862743b3: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.20.0.1  netmask 255.255.0.0  broadcast 172.20.255.255
        inet6 fe80::42:18ff:fe68:6f5e  prefixlen 64  scopeid 0x20<link>
        ether 02:42:18:68:6f:5e  txqueuelen 0  (Ethernet)
        RX packets 12  bytes 699 (699.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 17  bytes 12202 (12.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-fb4a1a6ffdce: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.1  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::42:12ff:feaf:abcc  prefixlen 64  scopeid 0x20<link>
        ether 02:42:12:af:ab:cc  txqueuelen 0  (Ethernet)
        RX packets 26  bytes 4052 (4.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 68  bytes 13912 (13.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:be:4c:46:18  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.65.9  netmask 255.255.255.0  broadcast 192.168.65.255
        inet6 fe80::5054:ff:fe12:3456  prefixlen 64  scopeid 0x20<link>
        ether 52:54:00:12:34:56  txqueuelen 1000  (Ethernet)
        RX packets 19853  bytes 2562859 (2.5 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18195  bytes 7005442 (7.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 140  bytes 18520 (18.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 140  bytes 18520 (18.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

services1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.65.6  netmask 255.255.255.255  broadcast 0.0.0.0
        inet6 fe80::3c19:b1ff:fe38:ffcb  prefixlen 64  scopeid 0x20<link>
        ether 3e:19:b1:38:ff:cb  txqueuelen 0  (Ethernet)
        RX packets 46  bytes 3709 (3.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 83  bytes 15611 (15.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth150498a: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::30b3:9eff:fe24:7a7a  prefixlen 64  scopeid 0x20<link>
        ether 32:b3:9e:24:7a:7a  txqueuelen 0  (Ethernet)
        RX packets 26  bytes 4416 (4.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 109  bytes 19474 (19.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
帖子版权声明 1、本帖标题:无法从 Docker 容器内访问以太网摄像头
    本站网址:http://xjnalaquan.com/
2、本网站的资源部分来源于网络,如有侵权,请联系站长进行删除处理。
3、会员发帖仅代表会员个人观点,并不代表本站赞同其观点和对其真实性负责。
4、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
5、站长邮箱:yeweds@126.com 除非注明,本帖由user10627299在本站《ubuntu》版块原创发布, 转载请注明出处!
最新回复 (0)
  • 我正在通过参考 GitHub‘https://github.com/yukw777/VideoBLIP’来进行‘视频字幕’。这是设置阶段我尝试了‘诗歌安装’但是,我收到了一个错误这是我的错误我认为......

    我参考了 GitHub 的“https://github.com/yukw777/VideoBLIP”来制作“视频字幕”。 这是设置阶段

    我尝试了“poetry install”,但是出现了错误, 这是我的错误

    我认为 pyproject.toml 文件中写有组的部分(如 [tool.poetry.group.dev])与此错误有关。

    pyproject.toml

    但我不知道如何解决

    我的 Python3 版本 -> 3.10.12我的诗歌版本 -> 1.1.12

    似乎是诗歌版本的问题,所以我把诗歌版本改成了1.2。但是,又出现了新的错误。 新错误

    所以我将其设置回1.1.12版本。

  • 我的场景中有一个游戏对象,按下一个键就可以添加子对象。现在,我该如何获取子对象并通过镜像将它们同步到客户端?我尝试了 NetworkServer.Spawn() 和 NetworkSer...

    我的场景中有一个游戏对象,按下按键即可添加子对象。现在,我该如何获取子对象并使用镜像将它们同步到客户端?

    我尝试过 NetworkServer.Spawn() NetworkServer.SpawnObjects() 我还尝试克隆带有子项的游戏对象,但也没有成功。

  • 我有一个安装在我的 Linux 子系统上的企业应用程序,我克隆了 repo,然后安装了 java 8(使用此命令 sudo apt-get install openjdk-8-jdk 但是打开 p...

    我有一个安装在 Linux 子系统上的企业应用程序,我克隆了 repo,然后安装了 Java 8(使用此命令 sudo apt-get install openjdk-8-jdk

    但是,在使用 Inteliji 打开项目时,我尝试构建 gradle 项目时收到以下消息: 请使用 JDK 而不是 JRE 作为 Gradle 导入器。打开 Gradle 设置

    我一直尝试改变一些设置但仍然失败。

    提前致谢。

    我将提供一份清单,列出我迄今为止为尝试修复此问题所采取的措施

    1. 我尝试通过删除 ubuntu 并安装然后克隆然后再次安装 java 8 来重新安装整个子系统。
    2. 尝试卸载我安装的 Java,然后尝试另一个版本 sudo apt install openjdk-8-jre-headless
    3. 我尝试在我的主操作系统(Windows)上安装 JDK,当然没有成功。
    4. 尝试将我的 wsl 上的 jdk 路径分配给变量 $IDEA_JDK 和 $JAVA_HOME,然后重置 inteliji

    我将提供我在 inteliji 中的设置的屏幕截图

    1. p7

    2. p8

    ubuntu 版本:发行商 ID:Ubuntu 描述:Ubuntu 20.04.6 LTSRelease:20.04Codename:focal

  • 今天早些时候,我尝试设置一个包含几个不同服务的 docker compose 文件,其中一个服务正在运行 nginx:latest。我的其他服务之一在 alpine:latest 上运行,并且...

    今天早些时候,我试图设置一个包含几个不同服务的 docker compose 文件,其中一个正在运行 nginx:latest 。我的其他服务之一正在运行 alpine:latest ,无论我怎么尝试,我都无法成功地从 alpine 容器中 curl nginx 服务,并且一直看到 Failed to connect to nginx port 80 curl 错误。从运行其他镜像的容器中 curl nginx 服务似乎没问题。

    为了尝试重现该问题,我 docker-compose.yml 尽可能地减少了文件,并得出了以下结论:

    services:
      alpine-test:
        build:
          dockerfile: Dockerfile.alpine
        command: sleep 3600
        networks:
          - test-network
      ubuntu-test:
        build: 
          dockerfile: Dockerfile.ubuntu
        command: sleep 3600
        networks:
          - test-network
      nginx:
        image: nginx:latest
        ports:
          - "8080:80"
        networks:
          - test-network
    networks:
      test-network:
        driver: bridge
    

    Dockerfile.ubuntu

    FROM ubuntu:latest
    
    RUN apt update -y && apt install -y curl
    

    Dockerfile.alpine

    FROM alpine:latest
    
    RUN apk update && apk add curl
    

    我正在用以下命令启动撰写项目:

    docker compose -f docker-compose.test.yaml up --force-recreate

    从 ubuntu 服务 curl nginx 服务:

    docker exec proj-local-ubuntu-test-1 curl -vv http://nginx

    输出:

      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 172.27.0.3:80...
    * Connected to nginx (172.27.0.3) port 80 (#0)
    > GET / HTTP/1.1
    > Host: nginx
    > User-Agent: curl/7.81.0
    > Accept: */*
    >
    * Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < Server: nginx/1.27.0
    < Date: Fri, 14 Jun 2024 23:52:50 GMT
    < Content-Type: text/html
    < Content-Length: 615
    < Last-Modified: Tue, 28 May 2024 13:22:30 GMT
    < Connection: keep-alive
    < ETag: "6655da96-267"
    < Accept-Ranges: bytes
    <
    { [615 bytes data]
    100   615  100   615    0     0   820k      0 --:--:-- --:--:-- --:--:--  600k
    * Connection #0 to host nginx left intact
    <!DOCTYPE html>
    <html>
    <head>
    <title>Welcome to nginx!</title>
    <style>
    html { color-scheme: light dark; }
    body { width: 35em; margin: 0 auto;
    font-family: Tahoma, Verdana, Arial, sans-serif; }
    </style>
    </head>
    <body>
    <h1>Welcome to nginx!</h1>
    <p>If you see this page, the nginx web server is successfully installed and
    working. Further configuration is required.</p>
    
    <p>For online documentation and support please refer to
    <a href="http://nginx.org/">nginx.org</a>.<br/>
    Commercial support is available at
    <a href="http://nginx.com/">nginx.com</a>.</p>
    
    <p><em>Thank you for using nginx.</em></p>
    </body>
    </html>
    

    从 alpine 服务 curling nginx 服务:

    docker exec proj-local-alpine-test-1 curl -vv http://nginx

    输出:

      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Host nginx:80 was resolved.
    * IPv6: (none)
    * IPv4: 192.168.1.1
    *   Trying 192.168.1.1:80...
      0     0    0     0    0     0      0      0 --:--:--  0:02:12 --:--:--     0* connect to 192.168.1.1 port 80 from 172.27.0.3 port 54744 failed: Operation timed out
    * Failed to connect to nginx port 80 after 132953 ms: Couldn't connect to server
      0     0    0     0    0     0      0      0 --:--:--  0:02:12 --:--:--     0
    * Closing connection
    curl: (28) Failed to connect to nginx port 80 after 132953 ms: Couldn't connect to server
    
    

    所有容器似乎都正确共享同一个网络:

    [
        {
            "Name": "cmapp-local_test-network",
            "Id": "5a258b6b903fec157391704554845314423dd261614cbbffb5feb178edbfb0cb",
            "Created": "2024-06-14T16:35:02.946998948-07:00",
            "Scope": "local",
            "Driver": "bridge",
            "EnableIPv6": false,
            "IPAM": {
                "Driver": "default",
                "Options": null,
                "Config": [
                    {
                        "Subnet": "172.27.0.0/16",
                        "Gateway": "172.27.0.1"
                    }
                ]
            },
            "Internal": false,
            "Attachable": false,
            "Ingress": false,
            "ConfigFrom": {
                "Network": ""
            },
            "ConfigOnly": false,
            "Containers": {
                "1a481a82e1aae822cacca707a997fca13d2a15a7a2ba9acaa2f67716f432301a": {
                    "Name": "cmapp-local-alpine-test-1",
                    "EndpointID": "cda6b08db448c918e4d3763cbc1d6bb628ee592f9dc6c61d2cb5e2233fb7ffc0",
                    "MacAddress": "02:42:ac:1b:00:03",
                    "IPv4Address": "172.27.0.3/16",
                    "IPv6Address": ""
                },
                "78416ae61c2c86dec2b978ba07dcaf7dc96b17fcd6b608ef21a60b55a90a05d6": {
                    "Name": "cmapp-local-ubuntu-test-1",
                    "EndpointID": "bf56252dd5a4b5ebd6cdab1f2c3b8653d64e5ced1d571b70c00caef2fc8722b8",
                    "MacAddress": "02:42:ac:1b:00:04",
                    "IPv4Address": "172.27.0.4/16",
                    "IPv6Address": ""
                },
                "a4e95ed049894930573c8d2713a832c27e5f8ef3d14196298e6c99c786aed25a": {
                    "Name": "cmapp-local-nginx-1",
                    "EndpointID": "74f816a26ff1bafc5936fe67d2e4c750ca1fdaaeedb879ea01a9aec5225e4e35",
                    "MacAddress": "02:42:ac:1b:00:02",
                    "IPv4Address": "172.27.0.2/16",
                    "IPv6Address": ""
                }
            },
            "Options": {},
            "Labels": {
                "com.docker.compose.network": "test-network",
                "com.docker.compose.project": "cmapp-local",
                "com.docker.compose.version": "2.27.1"
            }
        }
    ]
    
    

    ubuntu 和 alpine 容器中的文件看起来完全相同,大概是因为 docker 生成了它们 resolv.conf

    Ubuntu resolv.conf

    # Generated by Docker Engine.
    # This file can be edited; Docker Engine will not make further changes once it
    # has been modified.
    
    nameserver 127.0.0.11
    search lan
    options edns0 trust-ad ndots:0
    
    # Based on host file: '/etc/resolv.conf' (internal resolver)
    # ExtServers: [host(127.0.0.53)]
    # Overrides: []
    # Option ndots from: internal
    

    高山 resolv.conf

    # Generated by Docker Engine.
    # This file can be edited; Docker Engine will not make further changes once it
    # has been modified.
    
    nameserver 127.0.0.11
    search lan
    options edns0 trust-ad ndots:0
    
    # Based on host file: '/etc/resolv.conf' (internal resolver)
    # ExtServers: [host(127.0.0.53)]
    # Overrides: []
    # Option ndots from: internal
    

    在 Alpine 容器中 nslookup 运行

    Server:         127.0.0.11
    Address:        127.0.0.11:53
    
    Non-authoritative answer:
    
    Non-authoritative answer:
    Name:   nginx.lan
    Address: 192.168.1.1
    

    nslookup ubuntu 容器中的输出更符合我的预期:

    Server:         127.0.0.11
    Address:        127.0.0.11#53
    
    Non-authoritative answer:
    Name:   nginx
    Address: 172.27.0.2
    

    任何帮助都将不胜感激。谢谢。

  • 我正在制作一款多人游戏,到目前为止,我已经制作了一个可以移动的玩家、一个平台和多人连接的框架。我确保在制作过程中测试主机和客户端的连接情况

    我正在制作一款多人游戏,到目前为止,我制作了一个可以移动的玩家、一个平台和多人连接框架。在构建项目时,我确保测试主机和客户端的连接,一旦我为每个玩家提供了一个跟随他们并可以旋转的摄像头,客户端就会突然不再加入游戏。单击主机按钮会将您放入游戏中并按预期工作,但之后作为客户端加入不会将您生成在平台上。我也没有收到任何错误。以下是可能导致问题的脚本:首先:

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using Unity.Netcode;
    using Unity.Netcode.Transports.UTP;
    
    
    [System.Serializable]
    public struct PlayerNetworkState : INetworkSerializable
    {
        public Vector3 Position;
        public Vector3 Rotation;
    
        public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter
        {
            serializer.SerializeValue(ref Position);
            serializer.SerializeValue(ref Rotation);
        }
    }
    
    
    public class PlayerNetwork : NetworkBehaviour
    {
        [SerializeField] private bool usingServerAuth;
        private NetworkVariable<PlayerNetworkState> playerState;
        private Rigidbody playerRb;
    
        private void Awake()
        {
            playerRb = GetComponent<Rigidbody>();
            var permission = usingServerAuth ? NetworkVariableWritePermission.Server : NetworkVariableWritePermission.Owner;
            playerState = new NetworkVariable<PlayerNetworkState>(new PlayerNetworkState {Position = Vector3.zero, Rotation = Vector3.zero}, NetworkVariableReadPermission.Everyone, permission);
        }
    
        public override void OnNetworkSpawn()
        {
            if (!IsOwner) {
                Destroy(transform.GetComponent<Player>());
                Destroy(transform.GetComponent<CamController>());
            }
        } 
    
        private void Update()
        {
            if (IsOwner) TransmitState();
            else ConsumeState();
        }
    
        #region Transmit State
    
        private void TransmitState()
        {
            var state = new PlayerNetworkState
            {
                Position = playerRb.position,
                Rotation = transform.rotation.eulerAngles
            };
    
            if (IsServer || !usingServerAuth)
            {
                playerState.Value = state;
            }
            else
            {
                TransmitStateServerRpc(state);
            }
        }
    
        [ServerRpc(RequireOwnership = false)]
        private void TransmitStateServerRpc(PlayerNetworkState state)
        {
            playerState.Value = state;
        }
    
        #endregion
    
        #region Consume State
    
        private void ConsumeState()
        {
            transform.position = playerState.Value.Position;
            transform.rotation = Quaternion.Euler(playerState.Value.Rotation);
        }
    
        #endregion
    }
    

    第二:

    using System.Collections;
    using System.Collections.Generic;
    using Unity.Netcode;
    using UnityEngine;
    
    public class Player : NetworkBehaviour
    {
        private Rigidbody playerRb;
        public GameObject camHolderPrfb;
        public GameObject camHolder;
        public float speed;
    
        void Start()
        {
            camHolder = Instantiate(camHolderPrfb, transform.position, Quaternion.identity);
            playerRb = GetComponent<Rigidbody>();
            
        }
    
        void Update()
        {
            //Makes sure player can only control its character
            if (!IsOwner) {return;} 
            //Calculates player movement
            float forwInput = Input.GetAxis("Vertical");
            float horzInput = Input.GetAxis("Horizontal");
            Vector3 direction = camHolder.transform.forward * forwInput + camHolder.transform.right * horzInput;
            //Applies movement to player
            if (direction.magnitude > 1) {direction.Normalize();}
            playerRb.AddForce(direction * speed);
            
        }
    }
    

    第三:

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.SceneManagement;
    using Unity.Netcode;
    
    public class CamController : NetworkBehaviour
    {
    
        public float rotationSpeed;
        public float lerpSpeed;
        public GameObject camHolder;
        private Camera playerCamComp;
        private GameObject playerCam;
        public Player PlayerScr;
    
        void Start() 
        {
            camHolder = PlayerScr.camHolder;
            playerCamComp = camHolder.GetComponentInChildren<Camera>();
            playerCam = playerCamComp.gameObject;
        }
    
        void FixedUpdate()
        {
            //Camera is rotatable with left and right keys
            float camInput = Input.GetAxis("MoveCam");
            camHolder.transform.Rotate(Vector3.up, camInput * Time.deltaTime * rotationSpeed);
            //Camera moves and looks at the player
            camHolder.transform.position = Vector3.Lerp(camHolder.transform.position, transform.position, lerpSpeed * Time.deltaTime);
            playerCam.transform.LookAt(this.transform);
        }
    }
    

    所有脚本都分配给了玩家。还有一个脚本,当单击其中一个按钮时,它会生成启动主机、服务器和客户端按钮并停用主摄像头,这样玩家摄像头就可以代替它。如果您可能需要这个,请告诉我。绝对没有任何错误可以引导我朝着正确的方向前进,我甚至不知道在哪里添加日志进行调试。

  • 我的公司需要我们的机器安装 Windows 来获得其安全性(活动目录),而应用程序本身需要在 Linux 子系统上运行

  • 是的,仔细想想,为什么要选择像 Java 这样的跨平台语言,然后在 WSL 上构建东西让事情变得复杂呢?

  • 如果您在 Windows 上安装了 Intellij,JDK 也应该在那里。为什么“当然不起作用”?此外,Intellij 不会读取 WSL2 环境变量

  • 去过那里,做过那事,不值得付出努力。如果你想在 WSL 上开发,最好的选择是 Visual Code Studio,但你会遇到问题,我现在不记得具体是什么了。如果你想在 Linux 下运行某些东西,请使用 docker。如果你想在 Windows 上运行 Linux 命令,请使用 git-bash。WSL 实际上只适用于支持虚拟机。意见可能有所不同。

  • 当我使用您的 Compose 文件和 Dockerfile 运行容器时,它按预期工作。我正在想什么可能导致它不工作,但我真的想不出任何东西。Fwiw,我的主机是 Ubuntu 22.04,Docker 是 2.19.1,Compose 是 24.0.4。

  • 我想你必须直接向 Basler 支持部门寻求帮助。我记得 docker 也遇到过一些阻塞问题,可能是因为 Basler 用来拦截 UDP 流的低级过滤驱动程序。

返回
作者最近主题: