Skip to content

Instantly share code, notes, and snippets.

@harto
Created April 14, 2014 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harto/10610004 to your computer and use it in GitHub Desktop.
Save harto/10610004 to your computer and use it in GitHub Desktop.
42 layer image test
#!/bin/bash
# Test 42-layer image on EC2.
#
# Relevant info:
#
# ubuntu@domU-12-31-38-04-C2-78:~/layer-test$ docker info
# Containers: 145
# Images: 798
# Storage Driver: aufs
# Root Dir: /mnt/docker/aufs
# Dirs: 1088
# Execution Driver: native-0.1
# Kernel Version: 3.11.0-15-generic
# WARNING: No swap limit support
#
# ubuntu@domU-12-31-38-04-C2-78:~/layer-test$ mount | grep /mnt
# /dev/xvdb on /mnt type ext3 (rw,_netdev)
#
# Run like this:
#
# ./make-dockerfile.sh && docker build -t test .
#
# The final layer outputs something like:
#
# Step 42 : RUN echo layer=42
# ---> Running in e1575d3b71f7
# 2014/04/14 01:33:04 exec: "/bin/sh": stat /bin/sh: no such file or directory
# 2014/04/14 01:33:04 The command [/bin/sh -c echo 42] returned a non-zero code: 1
echo "FROM ubuntu:13.10" >Dockerfile
for i in $(seq 1 42); do
echo "RUN echo layer=$i" >>Dockerfile
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment