Can only connect to container when running on mac

The container runs on mac, and prople are able to connect to it from all OS’ with my client. But when the container is hosted on either Linux og Windows OS, it is not possible to connect to it. The Dockerfile looks like this:

FROM microsoft/dotnet:sdk AS build-env
WORKDIR /app

COPY *.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM microsoft/dotnet:aspnetcore-runtime
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "BizPro.dll"]

EXPOSE 7777:7777

The Dockerfile is then built with

docker build -t aspnetapp .

and run with

docker run -d -p 7777:7777 --name myapp aspnetapp