forked from kubernetes-client/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.gen-base
More file actions
43 lines (34 loc) · 1.74 KB
/
Dockerfile.gen-base
File metadata and controls
43 lines (34 loc) · 1.74 KB
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
FROM maven:3.5-jdk-8-slim
ARG OPENAPI_GENERATOR_COMMIT
ARG OPENAPI_GENERATOR_USER_ORG=OpenAPITools
# Install preprocessing script requirements
RUN apt-get update && apt-get -y install git python-pip && pip install urllib3==1.24.2
# Install Autorest
RUN apt-get update && apt-get -qq -y install libunwind8 libicu57 libssl1.0 liblttng-ust0 libcurl3 libuuid1 libkrb5-3 zlib1g gnupg2
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get update && apt-get -y install \
nodejs \
libunwind8-dev \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g autorest@3
# Check out specific commit of openapi-generator
RUN mkdir /source && \
cd /source && \
git clone -n https://github.com/${OPENAPI_GENERATOR_USER_ORG}/openapi-generator.git && \
cd openapi-generator && \
git checkout $OPENAPI_GENERATOR_COMMIT
# Build it and persist local repository
RUN mkdir /.npm && chmod -R go+rwx /.npm && chmod -R go+rwx /root && umask 0 && cd /source/openapi-generator && \
mvn install -DskipTests -Dmaven.test.skip=true -pl modules/openapi-generator-maven-plugin -am && \
cp -r /root/.m2/* /usr/share/maven/ref
RUN mkdir -p /node_modules && chmod -R go+rwx /node_modules
RUN npm install @microsoft.azure/autorest.csharp \
@microsoft.azure/autorest.modeler
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
RUN mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
RUN curl https://packages.microsoft.com/config/debian/9/prod.list > prod.list
RUN mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
RUN chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
RUN chown root:root /etc/apt/sources.list.d/microsoft-prod.list
RUN apt-get update
RUN apt-get install -yy -q dotnet-hosting-2.0.8