Skip to content

Commit 5e03b74

Browse files
committed
Cleanup hack/ Dockerfiles
Signed-off-by: Jess Frazelle <jessfraz@google.com>
1 parent c0579af commit 5e03b74

File tree

6 files changed

+37
-31
lines changed

6 files changed

+37
-31
lines changed

hack/gen-swagger-doc/Dockerfile

+21-16
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,32 @@
1414

1515
FROM java:7-jre
1616

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+
2530
ENV GRADLE_USER_HOME=/gradle-cache
2631

2732
COPY build.gradle build/
2833
COPY gen-swagger-docs.sh build/
2934

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
3641

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/
3944

4045
ENTRYPOINT ["build/gen-swagger-docs.sh"]

hack/jenkins/dockerized-e2e-runner.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ docker run --rm=true -i \
6161
-e "WORKSPACE=/workspace" \
6262
"${docker_extra_args[@]:+${docker_extra_args[@]}}" \
6363
"${METADATA_SERVER_ADD_HOST_ARGS[@]:+${METADATA_SERVER_ADD_HOST_ARGS[@]}}" \
64-
gcr.io/google_containers/kubekins-test:go1.6.2-docker1.9.1-rev2 \
64+
gcr.io/google_containers/kubekins-test:go1.6.2-docker1.9.1-rev3 \
6565
bash -c "bash <(curl -fsS --retry 3 --keepalive-time 2 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/e2e-runner.sh')"

hack/jenkins/gotest-dockerized.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ docker run --rm=true \
4444
-e "KUBE_VERIFY_GIT_BRANCH=${KUBE_VERIFY_GIT_BRANCH:-}" \
4545
-e "REPO_DIR=${REPO_DIR}" \
4646
-e "HOST_ARTIFACTS_DIR=${HOST_ARTIFACTS_DIR}" \
47-
-i gcr.io/google_containers/kubekins-test:go1.6.2-docker1.9.1-rev2 \
47+
-i gcr.io/google_containers/kubekins-test:go1.6.2-docker1.9.1-rev3 \
4848
bash -c "cd kubernetes && ${KUBE_TEST_SCRIPT:-./hack/jenkins/test-dockerized.sh}"

hack/jenkins/test-image/Dockerfile

+12-11
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,23 @@ WORKDIR /workspace
2828

2929
# dnsutils is needed by federation cluster scripts.
3030
# file is used when uploading test artifacts to GCS.
31-
# jq is used by hack/verify-godep-licenses.sh.
31+
# jq is used by hack/verify-godep-licenses.sh
3232
# python-pip is needed to install the AWS cli.
3333
# netcat is used by integration test scripts.
34-
RUN apt-get update && apt-get install -y \
35-
dnsutils \
36-
file \
37-
jq \
38-
python-pip \
39-
netcat-openbsd \
40-
rsync \
41-
&& rm -rf /var/lib/apt/lists/*
34+
RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y \
35+
dnsutils \
36+
file \
37+
jq \
38+
python-pip \
39+
netcat-openbsd \
40+
rsync \
41+
--no-install-recommends \
42+
&& rm -rf /var/lib/apt/lists/*
4243

4344
RUN curl -L "https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz" |\
4445
tar -C /usr/bin -xvzf- --strip-components=3 usr/local/bin/docker
4546

46-
RUN mkdir -p /go/src/k8s.io/kubernetes
47-
RUN ln -s /go/src/k8s.io/kubernetes /workspace/kubernetes
47+
RUN mkdir -p /go/src/k8s.io/kubernetes \
48+
&& ln -s /go/src/k8s.io/kubernetes /workspace/kubernetes
4849

4950
RUN /bin/bash

hack/jenkins/test-image/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ all: push
1616

1717
# Tag format: $GO_VERSION-$EMBEDDED_DOCKER_VERSION-$REVISION
1818
# These versions are specified in the Dockerfile
19-
TAG = go1.6.2-docker1.9.1-rev2
19+
TAG = go1.6.2-docker1.9.1-rev3
2020

2121
container:
2222
docker build -t gcr.io/google_containers/kubekins-test .

hack/update-api-reference-docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ for ver in $VERSIONS; do
7272
-v "${SWAGGER_PATH}":/swagger-source:z \
7373
-v "${REGISTER_FILE}":/register.go:z \
7474
--net=host -e "https_proxy=${KUBERNETES_HTTPS_PROXY:-}" \
75-
gcr.io/google_containers/gen-swagger-docs:v6 \
75+
gcr.io/google_containers/gen-swagger-docs:v7 \
7676
"${SWAGGER_JSON_NAME}"
7777
done
7878

0 commit comments

Comments
 (0)