1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-14 01:28:14 -05:00

Remove Server project Dockerfile

This commit is contained in:
Vince Grassia 2023-11-16 15:00:47 -05:00
parent ecf692e9b4
commit 70e9124b6b
No known key found for this signature in database
GPG Key ID: 9AD7505E8448CC08
3 changed files with 0 additions and 55 deletions

View File

@ -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

View File

@ -1,3 +0,0 @@
*
!obj/build-output/publish/*
!obj/Docker/empty/

View File

@ -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 ./