Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding .editorconfig file to build in dockerfiles + suppressing unnecessary warnings #799

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ COPY main/GarnetServer/*.csproj main/GarnetServer/
COPY metrics/HdrHistogram/*.csproj metrics/HdrHistogram/
COPY Directory.Build.props Directory.Build.props
COPY Directory.Packages.props Directory.Packages.props
COPY .editorconfig .editorconfig

RUN dotnet restore main/GarnetServer/GarnetServer.csproj -a $TARGETARCH

Expand All @@ -26,7 +27,7 @@ COPY metrics/ metrics/
COPY test/testcerts test/testcerts

WORKDIR /src/main/GarnetServer
RUN dotnet publish -a $TARGETARCH -c Release -o /app --no-restore --self-contained false -f net8.0
RUN dotnet publish -a $TARGETARCH -c Release -o /app --no-restore --self-contained false -f net8.0 -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false

# Final stage/image
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ COPY main/GarnetServer/*.csproj main/GarnetServer/
COPY metrics/HdrHistogram/*.csproj metrics/HdrHistogram/
COPY Directory.Build.props Directory.Build.props
COPY Directory.Packages.props Directory.Packages.props
COPY .editorconfig .editorconfig

RUN dotnet restore main/GarnetServer/GarnetServer.csproj -a $TARGETARCH

Expand All @@ -26,7 +27,7 @@ COPY metrics/ metrics/
COPY test/testcerts test/testcerts

WORKDIR /src/main/GarnetServer
RUN dotnet publish -a $TARGETARCH -c Release -o /app --no-restore --self-contained false -f net8.0
RUN dotnet publish -a $TARGETARCH -c Release -o /app --no-restore --self-contained false -f net8.0 -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false

# Final stage/image
FROM mcr.microsoft.com/dotnet/runtime:8.0-alpine AS runtime
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.cbl-mariner
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ COPY main/GarnetServer/*.csproj main/GarnetServer/
COPY metrics/HdrHistogram/*.csproj metrics/HdrHistogram/
COPY Directory.Build.props Directory.Build.props
COPY Directory.Packages.props Directory.Packages.props
COPY .editorconfig .editorconfig

RUN dotnet restore main/GarnetServer/GarnetServer.csproj -a $TARGETARCH

Expand All @@ -26,7 +27,7 @@ COPY metrics/ metrics/
COPY test/testcerts test/testcerts

WORKDIR /src/main/GarnetServer
RUN dotnet publish -a $TARGETARCH -c Release -o /app --no-restore --self-contained false -f net8.0
RUN dotnet publish -a $TARGETARCH -c Release -o /app --no-restore --self-contained false -f net8.0 -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false

# Final stage/image
FROM mcr.microsoft.com/dotnet/runtime:8.0-cbl-mariner2.0 AS runtime
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.chiseled
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ COPY main/GarnetServer/*.csproj main/GarnetServer/
COPY metrics/HdrHistogram/*.csproj metrics/HdrHistogram/
COPY Directory.Build.props Directory.Build.props
COPY Directory.Packages.props Directory.Packages.props
COPY .editorconfig .editorconfig

RUN dotnet restore main/GarnetServer/GarnetServer.csproj -a $TARGETARCH

Expand All @@ -30,7 +31,7 @@ COPY metrics/ metrics/
COPY test/testcerts test/testcerts

WORKDIR /src/main/GarnetServer
RUN dotnet publish -a $TARGETARCH -c Release -o /app --no-restore --self-contained false -f net8.0
RUN dotnet publish -a $TARGETARCH -c Release -o /app --no-restore --self-contained false -f net8.0 -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false

# Final stage/image
FROM mcr.microsoft.com/dotnet/runtime:8.0-jammy-chiseled AS runtime
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.nanoserver
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN dotnet restore
RUN dotnet build -c Release

# Copy and publish app and libraries
RUN dotnet publish -c Release -o /app -r win-x64 --self-contained false -f net8.0
RUN dotnet publish -c Release -o /app -r win-x64 --self-contained false -f net8.0 -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false

# Final stage/image
FROM mcr.microsoft.com/dotnet/runtime:8.0-nanoserver-$TAG AS runtime
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ COPY main/GarnetServer/*.csproj main/GarnetServer/
COPY metrics/HdrHistogram/*.csproj metrics/HdrHistogram/
COPY Directory.Build.props Directory.Build.props
COPY Directory.Packages.props Directory.Packages.props
COPY .editorconfig .editorconfig

RUN dotnet restore main/GarnetServer/GarnetServer.csproj -a $TARGETARCH

Expand All @@ -26,7 +27,7 @@ COPY metrics/ metrics/
COPY test/testcerts test/testcerts

WORKDIR /src/main/GarnetServer
RUN dotnet publish -a $TARGETARCH -c Release -o /app --no-restore --self-contained false -f net8.0
RUN dotnet publish -a $TARGETARCH -c Release -o /app --no-restore --self-contained false -f net8.0 -p:EnableSourceLink=false -p:EnableSourceControlManagerQueries=false

# Final stage/image
FROM mcr.microsoft.com/dotnet/runtime:8.0-jammy AS runtime
Expand Down