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:
parent
ecf692e9b4
commit
70e9124b6b
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -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
|
||||
|
@ -1,3 +0,0 @@
|
||||
*
|
||||
!obj/build-output/publish/*
|
||||
!obj/Docker/empty/
|
@ -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 ./
|
Loading…
x
Reference in New Issue
Block a user