Docker退出并显示状态码139 [英] Docker exiting with status code 139

查看:3135
本文介绍了Docker退出并显示状态码139的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.Net Core应用程序,它可以在docker映像上运行。我在命令行中输入:

I have a .Net Core application what it to run on a docker image. I typed in the command line :

docker run -d --net=bridge -it --name=testapp -v /var/test/:/var/test microsoft/aspnetcore-build /bin/bash -c "dotnet /var/test/test.dll"

它已创建但正在退出,并且状态码为139。可能是问题所在。

it is created but it is exiting with a status code 139. What could be the problem.

推荐答案

由于同时运行docker映像和运行bash命令(-c dotnet /var/test/test.dll),将其分为多个步骤。

Incited of running the docker image and running the bash command (-c "dotnet /var/test/test.dll") at the same time, divide it to steps.

例如:


  1. 运行以下命令:

  1. run this command:

docker run -d --net=bridge -it --name=testapp -v /var/test/:/var/test microsoft/aspnetcore-build

它将运行名为testapp的aspnetcore映像并在您的计算机之间映射测试文件和docker机器。

it will run an aspnetcore Image named testapp and map the test file between the your machine and the docker machine.

进入docker计算机:

enter the docker machine:

docker exec -it testapp bash


  • 进入/ var / test文件夹并运行应用程序:

  • enter the /var/test folder and run the app:

    dotnet test.dll
    


  • 这篇关于Docker退出并显示状态码139的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆