-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (41 loc) · 1.38 KB
/
Dockerfile
File metadata and controls
51 lines (41 loc) · 1.38 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# syntax=docker/dockerfile:1.7
FROM ubuntu:22.04 AS build
ARG DEBIAN_FRONTEND=noninteractive
ARG NODE_MAJOR=22
ARG CONFIGURATION=Release
ARG RUNTIME=linux-arm64
ARG FRAMEWORK=net10.0
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 \
DOTNET_NOLOGO=1 \
NUGET_XMLDOC_MODE=skip
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
wget \
xz-utils \
tar \
clang \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -o /tmp/packages-microsoft-prod.deb \
&& dpkg -i /tmp/packages-microsoft-prod.deb \
&& rm /tmp/packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends dotnet-sdk-10.0 \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash - \
&& apt-get update \
&& apt-get install -y --no-install-recommends nodejs \
&& node --version \
&& npm --version \
&& dotnet --version \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
COPY . .
RUN chmod +x scripts/build.sh \
&& CONFIGURATION="${CONFIGURATION}" RUNTIME="${RUNTIME}" FRAMEWORK="${FRAMEWORK}" ./scripts/build.sh
FROM scratch
COPY --from=build /workspace/dist/ /