From 70e9124b6b63050fb3ce37ac8ff69c8fbd78c3e4 Mon Sep 17 00:00:00 2001 From: Vince Grassia <593223+vgrassia@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:00:47 -0500 Subject: [PATCH] Remove Server project Dockerfile --- .github/workflows/build.yml | 3 --- util/Server/.dockerignore | 3 --- util/Server/Dockerfile | 49 ------------------------------------- 3 files changed, 55 deletions(-) delete mode 100644 util/Server/.dockerignore delete mode 100644 util/Server/Dockerfile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd4ce8c7dc..87655cdb58 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -137,9 +137,6 @@ jobs: - project_name: Scim base_path: ./bitwarden_license/src upload_artifact: true - - project_name: Server - base_path: ./util - upload_artifact: true - project_name: Setup base_path: ./util upload_artifact: true diff --git a/util/Server/.dockerignore b/util/Server/.dockerignore deleted file mode 100644 index 546b9afbef..0000000000 --- a/util/Server/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!obj/build-output/publish/* -!obj/Docker/empty/ diff --git a/util/Server/Dockerfile b/util/Server/Dockerfile deleted file mode 100644 index 8b78751ca1..0000000000 --- a/util/Server/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -############################################### -# Build stage # -############################################### -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:6.0 AS build - -# Docker buildx supplies the value for this arg -ARG TARGETPLATFORM - -# Determine proper runtime value for .NET -# We put the value in a file to be read by later layers. -RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ - RID=linux-x64 ; \ - elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ - RID=linux-arm64 ; \ - elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \ - RID=linux-arm ; \ - fi \ - && echo "RID=$RID" > /tmp/rid.txt - -# Copy csproj files as distinct layers -WORKDIR /source -COPY util/Server/*.csproj ./util/Server/ -COPY Directory.Build.props . - -# Restore Server project dependencies and tools -WORKDIR /source/util/Server -RUN . /tmp/rid.txt && dotnet restore -r $RID - -# Copy required project files -WORKDIR /source -COPY util/Server/. ./util/Server/ -COPY .git/. ./.git/ - -# Build Server app -WORKDIR /source/util/Server -RUN . /tmp/rid.txt && dotnet publish -c release -o /app/Server --no-restore --no-self-contained -r $RID - -WORKDIR /app - -############################################### -# App stage # -############################################### -FROM mcr.microsoft.com/dotnet/aspnet:6.0 - -LABEL com.bitwarden.product="bitwarden" - -# Copy app from the build stage -WORKDIR /bitwarden_server -COPY --from=build /app/Server ./ \ No newline at end of file