mirror of
https://github.com/bitwarden/server.git
synced 2025-06-24 12:48:48 -05:00
36 lines
794 B
Docker
36 lines
794 B
Docker
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
ARG TARGETPLATFORM
|
|
ARG BUILDPLATFORM
|
|
ENV PROJECT_NAME=Billing
|
|
|
|
WORKDIR /build
|
|
COPY ../../ ./
|
|
|
|
WORKDIR /build/src/${PROJECT_NAME}
|
|
|
|
RUN dotnet publish --self-contained /p:PublishSingleFile=true -o out
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
|
|
|
LABEL com.bitwarden.product="bitwarden"
|
|
|
|
ENV PROJECT_NAME=Billing
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
gosu \
|
|
curl \
|
|
krb5-user \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV ASPNETCORE_URLS=http://+:5000
|
|
|
|
WORKDIR /app
|
|
EXPOSE 5000
|
|
COPY --from=build /build/src/${PROJECT_NAME}/out /app
|
|
COPY ./src/${PROJECT_NAME}/entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
HEALTHCHECK CMD curl -f http://localhost:5000/alive || exit 1
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|