forked from renovatebot/docker-buildpack
/
Dockerfile
63 lines (42 loc) · 1.28 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
ARG IMAGE=renovate/buildpack
FROM ${IMAGE} as base
RUN touch /.dummy
COPY --chown=1000:0 test test
WORKDIR /test
#--------------------------------------
# net3: dotnet 3.1 base image
#--------------------------------------
FROM base as net3
# renovate: datasource=docker lookupName=mcr.microsoft.com/dotnet/sdk versioning=docker
RUN install-tool dotnet 3.1.424
USER 1000
RUN dotnet --info
SHELL [ "/bin/sh", "-c" ]
RUN dotnet --info
#--------------------------------------
# test: dotnet 3.1
#--------------------------------------
FROM net3 as testa
RUN set -ex; \
dotnet restore --use-lock-file
RUN set -ex; \
dotnet add package Newtonsoft.Json --version 12.0.3; \
dotnet restore --force-evaluate
#--------------------------------------
# test: dotnet 5.0
#--------------------------------------
FROM base as testb
# renovate: datasource=docker lookupName=mcr.microsoft.com/dotnet/sdk versioning=docker
RUN install-tool dotnet 6.0.402
USER 1000
RUN set -ex; \
dotnet restore --use-lock-file
RUN set -ex; \
dotnet add package Newtonsoft.Json --version 12.0.3; \
dotnet restore --force-evaluate
#--------------------------------------
# final
#--------------------------------------
FROM base
COPY --from=testa /.dummy /.dummy
COPY --from=testb /.dummy /.dummy