1+ FROM maven:3.5-jdk-8-slim
2+
3+ # Install preprocessing script requirements
4+ RUN apt-get update && apt-get -y install git python-pip && pip install urllib3==1.24.2
5+
6+ # Install Autorest
7+ RUN apt-get update && apt-get -qq -y install libunwind8 libicu57 libssl1.0 liblttng-ust0 libcurl3 libuuid1 libkrb5-3 zlib1g gnupg2
8+ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
9+ RUN apt-get update && apt-get -y install \
10+ nodejs \
11+ libunwind8-dev \
12+ && rm -rf /var/lib/apt/lists/*
13+
14+ RUN npm install -g autorest@3
15+
16+ # Check out specific commit of openapi-generator
17+ RUN mkdir /source && \
18+ cd /source && \
19+ git clone -n https://github.com/${OPENAPI_GENERATOR_USER_ORG}/openapi-generator.git && \
20+ cd openapi-generator && \
21+ git checkout $OPENAPI_GENERATOR_COMMIT
22+
23+ # Build it and persist local repository
24+ RUN mkdir /.npm && chmod -R go+rwx /.npm && chmod -R go+rwx /root && umask 0 && cd /source/openapi-generator && \
25+ mvn install -DskipTests -Dmaven.test.skip=true -pl modules/openapi-generator-maven-plugin -am && \
26+ cp -r /root/.m2/* /usr/share/maven/ref
27+
28+ RUN mkdir -p /node_modules && chmod -R go+rwx /node_modules
29+ RUN npm install @microsoft.azure/autorest.csharp \
30+ @microsoft.azure/autorest.modeler
31+
32+ RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
33+ RUN mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
34+ RUN curl https://packages.microsoft.com/config/debian/9/prod.list > prod.list
35+ RUN mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
36+ RUN chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
37+ RUN chown root:root /etc/apt/sources.list.d/microsoft-prod.list
38+
39+ RUN apt-get update
40+ RUN apt-get install -yy -q dotnet-hosting-2.0.8
0 commit comments