Skip to content

Commit

Permalink
Add bionic and deb_slim base images, optimize size for xenial (istio#…
Browse files Browse the repository at this point in the history
  • Loading branch information
costinm authored and istio-testing committed Jan 16, 2019
1 parent 505d963 commit 2c17ea5
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 3 deletions.
36 changes: 36 additions & 0 deletions docker/Dockerfile.bionic_debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM ubuntu:bionic
# Base image for debug builds.
# Built manually uploaded as "istionightly/base_debug"

# Do not add more stuff to this list that isn't small or critically useful.
# If you occasionally need something on the container do
# sudo apt-get update && apt-get whichever
RUN apt-get update && \
apt-get install --no-install-recommends -y \
curl \
iptables \
iproute2 \
iputils-ping \
knot-dnsutils \
netcat \
tcpdump \
net-tools \
lsof \
sudo && \
apt-get clean -y && \
rm -rf /var/cache/debconf/* /var/lib/apt/lists/* \
/var/log/* /tmp/* /var/tmp/*

# Required:
# iptables (1.8M) (required in init, for debugging in the other cases)
# iproute2 (1.5M) (required for init)

# Debug:
# curl (11M)
# tcpdump (5M)
# netcat (0.2M)
# net-tools (0.7M): netstat
# lsof (0.5M): for debugging open socket, file descriptors
# knot-dnsutils (4.5M): dig/nslookup

# Alternative: dnsutils(44M) for dig/nslookup
37 changes: 37 additions & 0 deletions docker/Dockerfile.deb_debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM debian:9-slim

# Base image for debug builds - base is 22M
# Built manually uploaded as "istionightly/base_debug"

# Do not add more stuff to this list that isn't small or critically useful.
# If you occasionally need something on the container do
# sudo apt-get update && apt-get whichever
RUN apt-get update && \
apt-get install --no-install-recommends -y \
curl \
iptables \
iproute2 \
iputils-ping \
knot-dnsutils \
netcat \
tcpdump \
net-tools \
lsof \
sudo && apt-get upgrade -y && \
apt-get clean -y && \
rm -rf /var/cache/debconf/* /var/lib/apt/lists/* \
/var/log/* /tmp/* /var/tmp/*

# Required:
# iptables (1.8M) (required in init, for debugging in the other cases)
# iproute2 (1.5M) (required for init)

# Debug:
# curl (11M)
# tcpdump (5M)
# netcat (0.2M)
# net-tools (0.7M): netstat
# lsof (0.5M): for debugging open socket, file descriptors
# knot-dnsutils (4.5M): dig/nslookup

# Alternative: dnsutils(44M) for dig/nslookup
4 changes: 1 addition & 3 deletions docker/Dockerfile.xenial_debug
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ RUN apt-get update && \
iptables \
iproute2 \
iputils-ping \
dnsutils \
knot-dnsutils \
netcat \
tcpdump \
net-tools \
libc6-dbg gdb \
elvis-tiny \
lsof \
linux-tools-generic \
sudo && apt-get upgrade -y && \
Expand Down
12 changes: 12 additions & 0 deletions tools/istio-docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,18 @@ docker.push: $(DOCKER_PUSH_TARGETS)
docker.basedebug:
docker build -t istionightly/base_debug -f docker/Dockerfile.xenial_debug docker/

# Run this target to generate images based on Bionic Ubuntu
# This must be run as a first step, before the 'docker' step.
docker.basedebug_bionic:
docker build -t istionightly/base_debug_bionic -f docker/Dockerfile.bionic_debug docker/
docker tag istionightly/base_debug_bionic istionightly/base_debug

# Run this target to generate images based on Debian Slim
# This must be run as a first step, before the 'docker' step.
docker.basedebug_deb:
docker build -t istionightly/base_debug_deb -f docker/Dockerfile.deb_debug docker/
docker tag istionightly/base_debug_deb istionightly/base_debug

# Job run from the nightly cron to publish an up-to-date xenial with the debug tools.
docker.push.basedebug: docker.basedebug
docker push istionightly/base_debug:latest

0 comments on commit 2c17ea5

Please sign in to comment.