How to debug a appliction on local Linux or WSL?

由于K8S权限控制,当部署在上面的应用程式出现问题后,无法还原用户出问题的场景。所以需要把程式部署到本地的Linux或WSL。

1.Upload application publish files to your Linux or WSL.

2.Add a Dockerfile

FROM harbor.xxx.com/dotnet/aspnet:6.0
MAINTAINER XXX
ENV ASPNETCORE_ENVIRONMENT=Development
ENV TZ=Asia/Shanghai
ENV LANG=en_US.UTF-8

WORKDIR /app

#RUN dotnet restore
#RUN dotnet publish -c Release -o out -r linux-x64

COPY ./publish .
ENV ASPNETCORE_URLS http://0.0.0.0:80
ENTRYPOINT ["dotnet", "XXX.dll"]

3.Docker build

docker build --no-cache -t {docker image REPOSITORY:TAG} .
For example: docker build --no-cache -t rubin-demo/faceimage-viewer:1.0 .

4.Start a container

# Doesn't save a container
docker run -it --rm --name {container name} -p {expose port:app port} {container image REPOSITORY:TAG} 
For example: docker run -it --rm --name faceimage-viewer -p 801:80 rubin-demo/faceimage-viewer:1.0 

# Save a container
docker run --name {container name} -p {expose port:app port} {container image REPOSITORY:TAG} 
For example: docker run --name faceimage-viewer -p 801:80 rubin-demo/faceimage-viewer:1.0

5.Go to container to debug your APP

docker exec -it {container name} /bin/bash
For example: docker exec -it faceimage-viewer /bin/bash

docker exec -it {container name} /bin/sh
For example: docker exec -it faceimage-viewer /bin/sh

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The error message you received indicates that the application is unable to find or load the Qt platform plugin "window". This error commonly occurs when the required Qt libraries and plugins are not properly installed or configured on your system. To resolve this issue, you can try the following steps: 1. Ensure that you have the necessary Qt libraries installed on your system. If not, download and install the appropriate version of Qt for your platform from the official Qt website. 2. Check if the required Qt platform plugin is present in the application's directory. Look for a folder named "platforms" in the application's installation directory. If it is missing, you can try copying the necessary plugin files (such as qwindows.dll on Windows) to this directory from your Qt installation directory. 3. Set the QT_PLUGIN_PATH environment variable to point to the correct directory containing the Qt plugins. You can do this by opening a command prompt or terminal and entering the following command (replace PATH_TO_QT_PLUGINS with the actual path to the Qt plugins directory): For Windows: ``` set QT_PLUGIN_PATH=PATH_TO_QT_PLUGINS ``` For Linux/macOS: ``` export QT_PLUGIN_PATH=PATH_TO_QT_PLUGINS ``` 4. If you are running the application from an IDE or development environment, make sure that the IDE's environment settings are correctly configured to locate the Qt libraries and plugins. If none of these steps resolve the issue, it could indicate a more complex problem with the application's configuration. In such cases, it may be helpful to seek assistance from the application's developer or support team for further troubleshooting.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值