diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index f9c4624..eac0e79 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -12,11 +12,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - dotnet-version: ['5.0.x', '6.0.x'] + dotnet-version: ['8.0.x'] steps: - uses : actions/checkout@v2 - name: Setup .NET SDK ${{matrix.dotnet-version}} - uses: actions/setup-dotnet@v1.7.2 + uses: actions/setup-dotnet@v4 with: dotnet-version: ${{matrix.dotnet-version}} - name: Install dependencies @@ -24,4 +24,4 @@ jobs: - name: Build run: dotnet build --configuration Release --no-restore - name: Test - run: dotnet test --no-restore --verbosity normal \ No newline at end of file + run: dotnet test --no-restore --verbosity normal diff --git a/Directory.Build.props b/Directory.Build.props index 2a0cbae..37526cb 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -11,9 +11,9 @@ - 6.0 + 8.0 5.0 - 5.0 + 8.0 net$(NetCoreCurrentVersion) net$(NetCoreMinimumVersion) $(NetCoreCurrent); diff --git a/ReadMe.md b/ReadMe.md index e9606e3..912bf97 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -12,7 +12,7 @@ ### Local Runs -- .NET 6.0.100 +- .NET 8.0 - bash ### Docker Runs @@ -21,7 +21,7 @@ ### Development -- Visual Studio 2022 17.0 +- Visual Studio 2022 ## Running @@ -39,7 +39,7 @@ git-cache-data_1 | Data container for Git cache git-cache_git-cache-data_1 exited with code 0 git-cache_1 | Hosting environment: Development git-cache_1 | Content root path: /app -git-cache_1 | Now listening on: http://[::]:80 +git-cache_1 | Now listening on: http://[::]:8085 git-cache_1 | Application started. Press Ctrl+C to shut down. ``` @@ -52,4 +52,5 @@ At this point should be able to clone using the cache: ## Configuration The default port on the host is `8085`. This can be controlled with -an environment variable `GIT_HTTP_PORT=8888` or with a `.env` file. \ No newline at end of file +an environment variable `GIT_HTTP_PORT=8888` or with a `.env` file. + diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 6fd993e..fe18761 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,8 +1,6 @@ -version: '3.4' - services: git-cache: environment: - ASPNETCORE_ENVIRONMENT=Development ports: - - "${GIT_HTTP_PORT:-8085}:80" + - "${GIT_HTTP_PORT:-8085}:8085" diff --git a/docker-compose.yml b/docker-compose.yml index 1a53339..d7c9b59 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.4' - services: git-cache-data: build: diff --git a/docker/git-cache-data/Dockerfile b/docker/git-cache-data/Dockerfile index f06ab52..7c8e248 100644 --- a/docker/git-cache-data/Dockerfile +++ b/docker/git-cache-data/Dockerfile @@ -1,6 +1,6 @@ -FROM ubuntu:xenial +FROM ubuntu:noble # user 1000 must match the user id for the jenkins user in jenkins-master -RUN useradd -d "/var/git_cache" -u 1000 -m -s /bin/bash gitcache +RUN useradd -d "/var/git_cache" -u 1042 -m -s /bin/bash gitcache USER gitcache VOLUME ["/var/gitcache"] CMD ["echo", "Data container for Git cache"] diff --git a/src/git-cache/Dockerfile b/src/git-cache/Dockerfile index 6d4ef3b..dc5b856 100644 --- a/src/git-cache/Dockerfile +++ b/src/git-cache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app EXPOSE 80 RUN apt-get update && apt-get install -y git @@ -11,7 +11,7 @@ RUN build_deps="curl" && \ DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove ${build_deps} && \ rm -r /var/lib/apt/lists/* -FROM mcr.microsoft.com/dotnet/sdk:6.0 as build +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY git-cache.sln ./ COPY Directory.* ./ @@ -26,7 +26,7 @@ WORKDIR /src/src/git-cache RUN dotnet build -c Release -o /app FROM build AS publish -RUN dotnet publish -c Release -o /app -f net6.0 +RUN dotnet publish -c Release -o /app -f net8.0 FROM base AS final WORKDIR /app diff --git a/src/git-cache/Program.cs b/src/git-cache/Program.cs index ecff1f3..857467f 100644 --- a/src/git-cache/Program.cs +++ b/src/git-cache/Program.cs @@ -41,6 +41,7 @@ public static void Main(string[] args) public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup() + .UseUrls("http://*:8085") .Build(); /*======================= PROTECTED =====================================*/ @@ -61,4 +62,4 @@ public static IWebHost BuildWebHost(string[] args) => } /* End of Class - Program */ } -/* End of document - Program.cs */ \ No newline at end of file +/* End of document - Program.cs */ diff --git a/src/git-cache/git-cache.csproj b/src/git-cache/git-cache.csproj index d70eaf7..4dc966f 100644 --- a/src/git-cache/git-cache.csproj +++ b/src/git-cache/git-cache.csproj @@ -19,7 +19,7 @@ - +