Skip to content

Commit

Permalink
Switch the base image to debian stretch slim. (kubernetes-sigs#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
roberthbailey authored and k8s-ci-robot committed May 25, 2018
1 parent 79f7f6a commit a082a27
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions cloud/google/cmd/gce-machine-controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ COPY . .
RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' sigs.k8s.io/cluster-api/cloud/google/cmd/gce-machine-controller

# Final container
FROM alpine:3.7
RUN apk --no-cache add ca-certificates bash openssh
FROM debian:stretch-slim
RUN apt-get update && apt-get install -y ca-certificates openssh-server && rm -rf /var/lib/apt/lists/*

COPY --from=builder /go/bin/gce-machine-controller .

2 changes: 1 addition & 1 deletion cloud/google/cmd/gce-machine-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GCR_BUCKET = k8s-cluster-api
PREFIX = gcr.io/$(GCR_BUCKET)
DEV_PREFIX ?= gcr.io/$(shell gcloud config get-value project)
NAME = gce-machine-controller
TAG = 0.0.10
TAG = 0.0.11

image:
docker build -t "$(PREFIX)/$(NAME):$(TAG)" -f ./Dockerfile ../../../..
Expand Down
6 changes: 3 additions & 3 deletions cloud/google/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ import (
"sigs.k8s.io/cluster-api/cloud/google/config"
)

var apiServerImage = "gcr.io/k8s-cluster-api/cluster-apiserver:0.0.3"
var controllerManagerImage = "gcr.io/k8s-cluster-api/controller-manager:0.0.3"
var machineControllerImage = "gcr.io/k8s-cluster-api/gce-machine-controller:0.0.10"
var apiServerImage = "gcr.io/k8s-cluster-api/cluster-apiserver:0.0.4"
var controllerManagerImage = "gcr.io/k8s-cluster-api/controller-manager:0.0.4"
var machineControllerImage = "gcr.io/k8s-cluster-api/gce-machine-controller:0.0.11"

func init() {
if img, ok := os.LookupEnv("MACHINE_CONTROLLER_IMAGE"); ok {
Expand Down
9 changes: 5 additions & 4 deletions cloud/terraform/cmd/terraform-machine-controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,20 @@ COPY . .
RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' sigs.k8s.io/cluster-api/cloud/terraform/cmd/terraform-machine-controller

# Final container
FROM alpine:3.7
FROM debian:stretch-slim

ENV TERRAFORM_VERSION=0.11.7
ENV TERRAFORM_ZIP=terraform_${TERRAFORM_VERSION}_linux_amd64.zip
ENV TERRAFORM_SHA256SUM=6b8ce67647a59b2a3f70199c304abca0ddec0e49fd060944c26f666298e23418
ENV TERRAFORM_SHAFILE=terraform_${TERRAFORM_VERSION}_SHA256SUMS

RUN apk --no-cache add --update bash ca-certificates curl openssh && \
RUN apt-get update && apt-get install -y ca-certificates curl openssh-server unzip && \
curl https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/${TERRAFORM_ZIP} > ${TERRAFORM_ZIP} && \
echo "${TERRAFORM_SHA256SUM} ${TERRAFORM_ZIP}" > ${TERRAFORM_SHAFILE} && \
sha256sum -cs ${TERRAFORM_SHAFILE} && \
sha256sum --quiet -c ${TERRAFORM_SHAFILE} && \
unzip ${TERRAFORM_ZIP} -d /bin && \
rm -f ${TERRAFORM_ZIP} ${TERRAFORM_SHAFILE} && \
echo 'plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"' >> ~/.terraformrc
echo 'plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"' >> ~/.terraformrc && \
rm -rf /var/lib/apt/lists/*

COPY --from=builder /go/bin/terraform-machine-controller .
2 changes: 1 addition & 1 deletion cloud/terraform/cmd/terraform-machine-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GCR_BUCKET = k8s-cluster-api
PREFIX = gcr.io/$(GCR_BUCKET)
DEV_PREFIX ?= gcr.io/$(shell gcloud config get-value project)
NAME = terraform-machine-controller
TAG = 0.0.4
TAG = 0.0.5

image:
docker build -t "$(PREFIX)/$(NAME):$(TAG)" -f ./Dockerfile ../../../..
Expand Down
6 changes: 3 additions & 3 deletions cloud/terraform/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ import (
"sigs.k8s.io/cluster-api/cloud/terraform/config"
)

var apiServerImage = "gcr.io/k8s-cluster-api/cluster-apiserver:0.0.3"
var controllerManagerImage = "gcr.io/k8s-cluster-api/controller-manager:0.0.3"
var machineControllerImage = "gcr.io/k8s-cluster-api/terraform-machine-controller:0.0.4"
var apiServerImage = "gcr.io/k8s-cluster-api/cluster-apiserver:0.0.4"
var controllerManagerImage = "gcr.io/k8s-cluster-api/controller-manager:0.0.4"
var machineControllerImage = "gcr.io/k8s-cluster-api/terraform-machine-controller:0.0.5"

func init() {
if img, ok := os.LookupEnv("MACHINE_CONTROLLER_IMAGE"); ok {
Expand Down
4 changes: 2 additions & 2 deletions cmd/apiserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ COPY . .
RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' sigs.k8s.io/cluster-api/cmd/apiserver

# Final container
FROM alpine:3.7
RUN apk --no-cache add ca-certificates bash
FROM debian:stretch-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*

COPY --from=builder /go/bin/apiserver .
2 changes: 1 addition & 1 deletion cmd/apiserver/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GCR_BUCKET = k8s-cluster-api
PREFIX = gcr.io/$(GCR_BUCKET)
DEV_PREFIX ?= gcr.io/$(shell gcloud config get-value project)
NAME = cluster-apiserver
TAG = 0.0.3
TAG = 0.0.4

image:
docker build -t "$(PREFIX)/$(NAME):$(TAG)" -f ./Dockerfile ../..
Expand Down
4 changes: 2 additions & 2 deletions cmd/controller-manager/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ COPY . .
RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' sigs.k8s.io/cluster-api/cmd/controller-manager

# Final container
FROM alpine:3.7
RUN apk --no-cache add ca-certificates bash
FROM debian:stretch-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*

COPY --from=builder /go/bin/controller-manager .
2 changes: 1 addition & 1 deletion cmd/controller-manager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GCR_BUCKET = k8s-cluster-api
PREFIX = gcr.io/$(GCR_BUCKET)
DEV_PREFIX ?= gcr.io/$(shell gcloud config get-value project)
NAME = controller-manager
TAG = 0.0.3
TAG = 0.0.4

image:
docker build -t "$(PREFIX)/$(NAME):$(TAG)" -f ./Dockerfile ../..
Expand Down

0 comments on commit a082a27

Please sign in to comment.