-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
36 lines (22 loc) · 842 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
LABEL org.opencontainers.image.source=https://github.com/marklechtermann/k8sdisturber
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs && \
npm install -g npm
WORKDIR /source
COPY src .
RUN dotnet publish -c release -o /app
FROM mcr.microsoft.com/dotnet/aspnet:8.0
ARG K8SVERSION=local
WORKDIR /app
RUN apt update && \
apt install -y htop curl net-tools vim &&\
curl -L -o /usr/local/bin/kubectl "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x /usr/local/bin/kubectl
RUN apt update && \
apt-get clean
COPY --from=build /app .
ENV ASPNETCORE_URLS=http://+:8080
ENV K8SVERSION=${K8SVERSION}
USER 1000
ENTRYPOINT ["dotnet", "k8sdisturber.dll"]