Skip to content

Instantly share code, notes, and snippets.

@noteed
Created November 30, 2013 17:55
Show Gist options
  • Save noteed/7722238 to your computer and use it in GitHub Desktop.
Save noteed/7722238 to your computer and use it in GitHub Desktop.
Dockerfile demonstrating (probably) a bug in Docker (in 0.7 and I think in 0.6.5).
#! /bin/bash
echo Before scp.
scp a scp@172.17.0.19:b
echo After scp.
while [ true ] ; do
echo "Now looping (which is good)."
sleep 1
done
from ubuntu:12.04
maintainer Vo Minh Thu <noteed@gmail.com>
run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
run apt-get update
# Install PostgreSQL (for the postgres user)
run apt-get install -q -y postgresql-9.1
# Install OpenSSH (for scp)
run apt-get install -q -y openssh-client
# When run, this should loop endlessly, but does not, which is the problem being demonstrated.
add boom.sh /usr/bin/boom.sh
cmd ["/bin/su", "postgres", "-c", "boom.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment