forked from rexlManu/la-dpsmeter
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (26 loc) · 865 Bytes
/
Dockerfile
File metadata and controls
33 lines (26 loc) · 865 Bytes
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
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-backend
WORKDIR /app
COPY . ./
RUN dotnet restore
RUN dotnet publish -c Release -o out
FROM node:16-alpine AS build-overlay
WORKDIR /app
COPY ./Overlay/package.json ./
COPY ./Overlay/yarn.lock ./
RUN yarn
COPY ./Overlay ./
RUN yarn build
FROM mcr.microsoft.com/dotnet/aspnet:6.0
# Install libpcap with remote control support
RUN apt-get update \
&& apt-get install flex bison wget build-essential -y --no-install-recommends \
&& apt-get clean
RUN wget https://www.tcpdump.org/release/libpcap-1.10.1.tar.gz && tar xzf libpcap-1.10.1.tar.gz \
&& cd libpcap-1.10.1 \
&& ./configure --enable-remote && make install
WORKDIR /app
COPY --from=build-backend /app/out .
RUN mkdir -p /app/frontend
COPY --from=build-overlay /app/dist /app/frontend
COPY ./bin/* ./
ENTRYPOINT ["dotnet", "dps-meter.dll"]