Reduce size of images using debian-base

This commit is contained in:
Manuel de Brito Fontes 2017-07-07 19:13:04 -04:00
parent e7a4222439
commit 2e6109a22d
5 changed files with 23 additions and 13 deletions

View File

@ -12,13 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM gcr.io/google_containers/debian-base-amd64:0.1
# Install packages:
# curl (to download golang)
# git (for getting the current head)
# gcc make (for compilation)
RUN apt-get update && apt-get install --yes curl git gcc make
RUN apt-get update && apt-get install --yes --reinstall lsb-base \
&& apt-get install --yes curl git gcc make bash \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install golang
RUN curl -L https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz | tar zx -C /usr/local

View File

@ -12,10 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM gcr.io/google_containers/debian-base-amd64:0.1
# ca-certificates: Needed to talk to EC2 API
RUN apt-get update && apt-get install --yes ca-certificates
RUN apt-get update && apt-get install --yes ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY /.build/artifacts/dns-controller /usr/bin/dns-controller

View File

@ -12,13 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM gcr.io/google_containers/debian-base-amd64:0.1
# Install packages:
# curl (to download golang)
# git (for getting the current head)
# gcc make (for compilation)
RUN apt-get update && apt-get install --yes curl git gcc make
RUN apt-get update && apt-get install --yes --reinstall lsb-base \
&& apt-get install --yes curl git gcc make bash \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install golang
RUN curl -L https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz | tar zx -C /usr/local

View File

@ -12,11 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM gcr.io/google_containers/debian-base-amd64:0.1
# ca-certificates: Needed to talk to EC2 API
# e2fsprogs: Needed to mount / format ext4 filesytems
RUN apt-get update && apt-get install --yes ca-certificates e2fsprogs
RUN apt-get update && apt-get install --yes \
bash ca-certificates e2fsprogs systemd \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY /.build/artifacts/kubectl /usr/bin/kubectl

View File

@ -12,15 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
FROM gcr.io/google_containers/debian-base-amd64:0.1
RUN echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list
RUN echo "deb-src http://ftp.us.debian.org/debian/ jessie main" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install --yes dpkg-dev
RUN apt-get build-dep --yes socat
RUN apt-get update && apt-get install --yes dpkg-dev bash \
&& apt-get build-dep --yes socat \
&& apt-get clean
RUN mkdir /socat