Giter VIP home page Giter VIP logo

Comments (3)

kzu avatar kzu commented on August 16, 2024 1

It's not about a .git folder. GitInfo actually uses the git CLI. So, you need to be building an actually cloned repo, and the docker image needs to also have git installed and in the PATH.

from gitinfo.

zai-tm avatar zai-tm commented on August 16, 2024

I don't mean to bump but i'm having the exact same issue and installing git in the container didn't work. my dockerfile looks like this:

FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
WORKDIR /app
RUN apt-get -y update
RUN apt-get -y install git

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["XaiSharp/XaiSharp.csproj", "XaiSharp/"]
RUN dotnet restore "XaiSharp/XaiSharp.csproj"
ADD . .
COPY . .
WORKDIR "/src/XaiSharp"
RUN dotnet build "XaiSharp.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "XaiSharp.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "XaiSharp.dll"]

from gitinfo.

kzu avatar kzu commented on August 16, 2024

Before the build, run (for example) git log -n1 and see if you get something. My gut feeling tells me git is either not installed or the folder where the build is running is not actually a properly cloned repo.

from gitinfo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.