Dockerfile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
  2. FROM opensuse/tumbleweed AS base
  3. RUN zypper -n update
  4. RUN zypper --non-interactive install libicu
  5. RUN zypper --non-interactive install libncurses5
  6. RUN zypper --non-interactive install wget
  7. RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc
  8. RUN wget https://packages.microsoft.com/config/opensuse/15/prod.repo
  9. RUN mv prod.repo /etc/zypp/repos.d/microsoft-prod.repo
  10. RUN chown root:root /etc/zypp/repos.d/microsoft-prod.repo
  11. RUN zypper --non-interactive install dotnet-sdk-7.0
  12. ENV LANG=en_US.UTF-8 \
  13. TERM=xterm-256color \
  14. DISPLAY=:0
  15. WORKDIR /app
  16. FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
  17. WORKDIR /src
  18. COPY ["Terminal.Gui/Directory.Build.props", "Terminal.Gui/"]
  19. COPY ["UICatalog/UICatalog.csproj", "UICatalog/"]
  20. COPY ["Terminal.Gui/Terminal.Gui.csproj", "Terminal.Gui/"]
  21. RUN dotnet restore "UICatalog/UICatalog.csproj"
  22. COPY . .
  23. WORKDIR "/src/UICatalog"
  24. RUN dotnet build "UICatalog.csproj" -c Release -o /app/build
  25. FROM build AS publish
  26. RUN dotnet publish "UICatalog.csproj" -c Release -o /app/publish /p:UseAppHost=false
  27. FROM base AS final
  28. WORKDIR /app
  29. COPY --from=publish /app/publish .
  30. ENTRYPOINT ["dotnet", "UICatalog.dll"]