Question: I'm new in docker and I'm trying to dockerizing a .NET core app, the compiled app when I run it without a live server is should give this error.

[![enter image description here](https://i.stack.imgur.com/dakoU.png)](https://i.stack.imgur.com/dakoU.png)

the dockerfile I use to build an image for this app is

```
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env

WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o bin

WORKDIR /app/bin

ENTRYPOINT ["dotnet", "Rescue.Bridge.dll"]

```

the output when running the container is

[![enter image description here](https://i.stack.imgur.com/ShGTW.png)](https://i.stack.imgur.com/ShGTW.png)

my question is that I can't figure out what is missing/wrong so I can get the same output as the compiled version without docker?

Answer: 
You can still use `retry` or `retryWhen` observable operators as long as your service function returns `Observable`.

Using `retry`:

```js
this.infoService.getInfo()
  .pipe(
     retry(3), // you retry 3 times
     delay(1000) // each retry will start after 1 second,
  )
  .subscribe(res => {
     // success
  })

```

Using `retryWhen`:

```js
this.infoService.getInfo()
  .pipe(
     retryWhen(errors => errors.pipe(
         // define conditions for retrying with some of observable operators
     )),
  )
  .subscribe(res => {
     // success
  })

```
Please try this way. Use rxjs retry() from rxjs/operators.

<https://angular.io/guide/rx-library#retry-failed-observable>