Docker Community Forums

Share and learn in the Docker community.

Identity Server

build
docker

(Samuelrichards) #1

I have “Dockerized” my Angular app and my Identity Server app, so a user can navigate to the Identity Server login from the Angular app. However, I get a 500 Server Error when I attempt to login inside the Identity Server, and the screen says “Sorry, there was an error”.

Running the Angular / ID Server locally does not present this issue, and I can login to Identity Server and return to the Angular app without a problem.

Here is the Dockerfile for my ID Server app:

`FROM microsoft/dotnet:2.1-sdk AS build-env 
ARG source
 RUN echo "source: $source" 
WORKDIR /app 
RUN apt-get update && apt-get install -y apt-transport-https 
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash 
RUN apt-get install nodejs 
RUN node -v 
RUN npm -v # Copy csproj and restore as distinct layers 
COPY *.csproj ./ 
RUN dotnet restore #Copy everything else & build 
COPY . ./ 
RUN dotnet publish -c Release -o out # Build runtime image 
FROM microsoft/dotnet:2.1-sdk WORKDIR /app 
COPY --from=build-env /app/out . 
ENV ASPNETCORE_URLS=http://*:5000 
EXPOSE 5000 
ENTRYPOINT ["dotnet", "IdentityServerWithAspNetIdentity.dll"]`

Can someone point me in the right direction here? I’m a Docker newbie, so any help offered would be greatly appreciated. Thank you