-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDockerfile
38 lines (23 loc) · 953 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
37
38
ARG DOTNET_SDK_VERSION=8.0.100
ARG PLATFORM=alpine3.18
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION}-1-${PLATFORM} AS build
ENV DOTNET_CLI_TELEMETRY_OPTOUT=true
ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
COPY . /project
WORKDIR /project
RUN dotnet pack -c Release src
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION}-1-${PLATFORM} AS tool
COPY --from=build /project/dist/*.nupkg /dist/
COPY --from=build /project/etc/sourceless-nuget.config nuget.config
RUN dotnet tool install --global \
--configfile nuget.config \
--add-source dist \
LinqPadless --version 2.0.0
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION}-1-${PLATFORM}
COPY --from=tool /root/.dotnet/tools /root/.dotnet/tools
ENV PATH=$PATH:/root/.dotnet/tools
COPY --from=build /project/.lpless /scripts/.lpless
COPY --from=build /project/.lplessroot /scripts
RUN mkdir /scripts/linq
WORKDIR /scripts/linq
ENTRYPOINT [ "lpless" ]