forked from esa/asn1scc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.runtime
37 lines (31 loc) · 1.36 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
# syntax = docker/dockerfile:experimental
FROM debian:stretch as builder
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
set -ex ;\
apt update ;\
apt-get install -y mono-devel mono-complete fsharp mono-xbuild python3 \
gnat-6 gcc g++ make openjdk-8-jre nuget libgit2-dev libssl-dev
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
set -ex ;\
apt-get install -y git
RUN set -ex ;\
cd /tmp ;\
git clone https://github.com/ttsiodras/asn1scc.git ;\
cd asn1scc/ ;\
nuget restore ;\
xbuild ;\
xbuild /p:Configuration=Release ;\
cd /tmp ;\
mkdir asn1install ;\
cd asn1install ;\
cp ../asn1scc/Asn1f4/bin/Release/*.dll . ;\
cp ../asn1scc/Asn1f4/bin/Release/*.exe . ;\
mv Asn1f4.exe asn1.exe ;\
chmod +x asn1.exe ;\
cp ../asn1scc/Asn1f4/bin/Release/*.stg .
#################################################################################################
#################################################################################################
FROM alpine:edge
COPY --from=builder /tmp/asn1install /opt/asn1scc
RUN apk add --no-cache mono --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing