[英]WebDriverException: unknown error: MSEdge failed to start: was killed
[英]Cloud Run error: Container failed to start. Failed to start and then listen on the port
我已經完全按照我認為應該做的那樣做。 如果我在雲上運行它,我的應用程序就可以工作。 我運行的命令: gcloud builds submit --tag gcr.io/****
gcloud run deploy *** --region us-central1 --platform managed --image gcr.io/t*** --allow-unauthenticated --port=26951
Dockerfile:
FROM mcr.microsoft.com/dotnet/sdk
COPY . /app
WORKDIR /app
RUN dotnet publish -c Release -o out
ENTRYPOINT ["dotnet", "Test.dll"]
程序:
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
namespace Server
{
class Program
{
private static TcpListener tcpListener;
public static void Main(string[] args)
{
tcpListener = new TcpListener(IPAddress.Any, 26951);
tcpListener.Start();
tcpListener.BeginAcceptTcpClient(TCPConnectCallback, null);
}
private static void TCPConnectCallback(IAsyncResult _result)
{
TcpClient _client = tcpListener.EndAcceptTcpClient(_result);
}
}
}
CSProj:
<Project Sdk="***">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
</Project>
所有這些都在同一個位置
解決方案是像這樣更改 dockerfile:
FROM mcr.microsoft.com/dotnet/sdk:3.1 WORKDIR /app
COPY . .
ENTRYPOINT ["dotnet", "run"]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.