mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-02-17 09:37:49 +01:00
Merge pull request #123 from calavera/run_all_the_containers
This commit is contained in:
commit
006f7b029d
37
run.sh
Executable file
37
run.sh
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# This script allows you to launch several images
|
||||
# from this repository once they're built.
|
||||
#
|
||||
# Make sure you add the `docker run` command
|
||||
# in the header of the Dockerfile so the script
|
||||
# can find it and execute it.
|
||||
#
|
||||
# Use pulseaudio/Dockerfile and skype/Dockerfile as examples.
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 [--test] image1 image2 ..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "--test" ]; then
|
||||
TEST=1
|
||||
shift
|
||||
fi
|
||||
|
||||
for name in "$@"; do
|
||||
if [ ! -d $name ]; then
|
||||
echo "unable to find container configuration with name $name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
script=`sed -n '/docker run/,/^#$/p' $name/Dockerfile | head -n -1 | sed -e 's/\#//' | sed -e 's/\\\//'`
|
||||
|
||||
if [ $TEST ]; then
|
||||
echo $script
|
||||
else
|
||||
eval $script
|
||||
fi
|
||||
|
||||
shift
|
||||
done
|
|
@ -7,6 +7,7 @@
|
|||
# --link pulseaudio:pulseaudio \
|
||||
# -e PULSE_SERVER=pulseaudio \
|
||||
# --device /dev/video0 \
|
||||
# --name skype
|
||||
# jess/skype
|
||||
#
|
||||
FROM debian:jessie
|
||||
|
|
Loading…
Reference in New Issue
Block a user