|
14 | 14 |
|
15 | 15 | FROM java:7-jre
|
16 | 16 |
|
17 |
| -RUN apt-get update |
18 |
| -RUN apt-get install -qq -y asciidoctor |
19 |
| -RUN apt-get install -qq -y unzip |
20 |
| -RUN wget https://services.gradle.org/distributions/gradle-2.5-bin.zip |
21 |
| -RUN mkdir build/ |
22 |
| -RUN unzip gradle-2.5-bin.zip -d build/ |
23 |
| - |
24 |
| -RUN mkdir gradle-cache/ |
| 17 | +RUN apt-get update && apt-get install -y \ |
| 18 | + asciidoctor \ |
| 19 | + unzip \ |
| 20 | + --no-install-recommends \ |
| 21 | + && rm -rf /var/lib/apt/lists/* |
| 22 | + |
| 23 | +# Install gradle |
| 24 | +RUN wget -O /tmp/gradle.zip https://services.gradle.org/distributions/gradle-2.5-bin.zip \ |
| 25 | + && mkdir -p build/ \ |
| 26 | + && unzip /tmp/gradle.zip -d build/ \ |
| 27 | + && rm /tmp/gradle.zip \ |
| 28 | + && mkdir -p gradle-cache/ |
| 29 | + |
25 | 30 | ENV GRADLE_USER_HOME=/gradle-cache
|
26 | 31 |
|
27 | 32 | COPY build.gradle build/
|
28 | 33 | COPY gen-swagger-docs.sh build/
|
29 | 34 |
|
30 |
| -#run the script once to download the dependent java libraries into the image |
31 |
| -RUN mkdir /output /swagger-source |
32 |
| -RUN wget https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/swagger-spec/v1.json -O /swagger-source/v1.json |
33 |
| -RUN wget https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/pkg/api/v1/register.go -O /register.go |
34 |
| -RUN build/gen-swagger-docs.sh v1 |
35 |
| -RUN rm /output/* /swagger-source/* /register.go |
| 35 | +# Run the script once to download the dependent java libraries into the image |
| 36 | +RUN mkdir -p /output /swagger-source \ |
| 37 | + && wget https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/swagger-spec/v1.json -O /swagger-source/v1.json \ |
| 38 | + && wget https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/pkg/api/v1/register.go -O /register.go \ |
| 39 | + && build/gen-swagger-docs.sh v1 \ |
| 40 | + && rm -rf /output/* /swagger-source/* /register.go |
36 | 41 |
|
37 |
| -RUN chmod -R 777 build/ |
38 |
| -RUN chmod -R 777 gradle-cache/ |
| 42 | +RUN chmod -R 777 build/ \ |
| 43 | + && chmod -R 777 gradle-cache/ |
39 | 44 |
|
40 | 45 | ENTRYPOINT ["build/gen-swagger-docs.sh"]
|
0 commit comments