forked from ateleris/asn1scc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.runtime
37 lines (28 loc) · 1.26 KB
/
Dockerfile.runtime
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
#
# Builder: Build a release version of asn1scc from upstream.
# Runtime: Run asn1scc.
#
#################################################################################################
#################################################################################################
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS builder
RUN apt update
#RUN mkdir /usr/share/man/man1
RUN apt install -y python3 python3-distutils \
make openjdk-11-jre nuget libgit2-dev libssl-dev ; apt clean
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
set -ex ;\
apt-get install -y git
WORKDIR /src
RUN set -ex ;\
git clone https://github.com/maxime-esa/asn1scc.git ;\
cd asn1scc/ ;\
#git checkout dotnetcore ;\
dotnet build Antlr/ --configuration Release ;\
dotnet build parseStg2/ --configuration Release ;\
dotnet build "asn1scc.sln" --configuration Release
#################################################################################################
#################################################################################################
FROM mcr.microsoft.com/dotnet/runtime:7.0
COPY --from=builder /src/asn1scc/asn1scc/bin/Release/net7.0/ /opt/asn1scc
WORKDIR /tmp
ENTRYPOINT ["/opt/asn1scc/asn1scc"]