Docker Community Forums

Share and learn in the Docker community.

How can I build a .net core image using selenium/node-firefox:3.5.3-boron as base image

docker

(Dockeryanhuang545) #1

How can I build a .net core image using selenium/node-firefox:3.5.3-boron as base image?

I created a dockerfile below, but it does not work

FROM selenium/node-firefox:3.5.3-boron AS base
WORKDIR /app
EXPOSE 80

FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY *.sln ./
COPY DotNetCoreWebApp/DotNetCoreWebApp.csproj DotNetCoreWebApp/
RUN dotnet restore
COPY . .
WORKDIR /src/DotNetCoreWebApp
RUN dotnet build -c Release -o /out

FROM build AS publish
RUN dotnet publish -c Release -o /out

FROM base AS final
WORKDIR /app
COPY --from=publish /out .
ENTRYPOINT [“dotnet”, “DotNetCoreWebApp.dll”]