server management
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -13,19 +13,33 @@ RUN dotnet restore src/EntKube.Web/EntKube.Web.csproj
|
||||
|
||||
COPY src/ src/
|
||||
RUN dotnet publish src/EntKube.Web/EntKube.Web.csproj \
|
||||
--no-restore \
|
||||
-c Release \
|
||||
-o /app/publish
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
|
||||
WORKDIR /app
|
||||
|
||||
# libgit2sharp bundles its native lib, but needs libssl/libcurl on Debian
|
||||
# libgit2sharp needs libssl/libcurl; git is used by GitOperationsService;
|
||||
# kubectl and helm are invoked by KubernetesOperationsService/ComponentLifecycleService.
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libssl3 \
|
||||
libcurl4 \
|
||||
git \
|
||||
openssh-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# kubectl — latest stable, architecture-aware
|
||||
RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \
|
||||
KUBECTL_VERSION=$(curl -fsSL https://dl.k8s.io/release/stable.txt) && \
|
||||
curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl" \
|
||||
-o /usr/local/bin/kubectl && \
|
||||
chmod +x /usr/local/bin/kubectl
|
||||
|
||||
# helm — latest stable via official installer script
|
||||
RUN curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
||||
|
||||
# Run as non-root
|
||||
RUN groupadd --system appgroup && useradd --system --gid appgroup --no-create-home appuser
|
||||
RUN mkdir -p /app/Data && chown appuser:appgroup /app/Data
|
||||
|
||||
Reference in New Issue
Block a user