Mirasy, mam problem z #aws ecs. Próbuje wrzucić obraz dockera z najprostszą aplikacją napisaną w .net core (standardowy template z value controller). Kiedy wchodzę na endpoint w przeglądarce dostaje: ERRCONNECTIONREFUSED.
W Security policy mam mam ustawione http na port 80 i dostęp Anywhere.
#copy project from the source to the docker container filesystem COPY ./DockerTestAWS/DockerTestAWS.csproj ./DockerTestAWS/ RUN dotnet restore ./DockerTestAWS/
COPY ./DockerTestAWS/ ./DockerTestAWS/ RUN dotnet build ./DockerTestAWS/
#publish RUN dotnet publish ./DockerTestAWS/ -o /app/out --configuration Release
#expose 80 #publish stage FROM microsoft/aspnetcore AS runtime-stage WORKDIR /app COPY --from=builder-stage /app/out .
@Klopsztanga: Cluster mam Linuxowy, ale apka jest .net corze więc nie powinno być problemu z hostowaniem jej na linuchu. Jak doklepać się do tych logów? Jak patrzę na cluster, to mam Running Task = 0.
@GaHee: Ok, jakąś informacje zdobyłem. Jest wymowna, ale nie wiem nadal jak to inaczej zrobić. Lecę zgodnie z tutorialem. Czy znaczenie może mieć to, że docker for windows mam ustawione windowsowe kontenery? Pewnie ma to znaczenie. (✌゚∀゚)☞
W Security policy mam mam ustawione http na port 80 i dostęp Anywhere.
Tutaj kod z Dockerfile #docker :
#Builder stage
FROM microsoft/aspnetcore-build AS builder-stage
#set working directory to /app
WORKDIR /app
#copy project from the source to the docker container filesystem
COPY ./DockerTestAWS/DockerTestAWS.csproj ./DockerTestAWS/
RUN dotnet restore ./DockerTestAWS/
COPY ./DockerTestAWS/ ./DockerTestAWS/
RUN dotnet build ./DockerTestAWS/
#publish
RUN dotnet publish ./DockerTestAWS/ -o /app/out --configuration Release
#expose 80
#publish stage
FROM microsoft/aspnetcore AS runtime-stage
WORKDIR /app
COPY --from=builder-stage /app/out .
#entry point
ENTRYPOINT ["dotnet", "DockerTestAWS.dll"]
trochę #naukaprogramowania i #programowanie