Skip to content

Commit

Permalink
Add course #2
Browse files Browse the repository at this point in the history
  • Loading branch information
fjammes committed Nov 3, 2016
1 parent 6f1acb8 commit 8b42f8c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
23 changes: 23 additions & 0 deletions resources/2/10-containers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# cat /proc/meminfo

serverCount=10
startDate=$(date)
for n in $(seq 1 1 $serverCount)
do
hostPort=$(($n + 10000))
provider="World #$n"
echo "Starting $n. Host Port: $hostPort, Message: $provider"
docker run -d -p $hostPort:5000 -e "PROVIDER=$provider" training/webapp
done
echo
echo Started $n containers. Start time: $startDate, end time: $(date)

# Stop all: docker stop $(docker ps -q)
# Remove all stopped: docker rm $(docker ps -aq)

# Test run:
# free –m: 1494
# 1 Container: 1480
# 100 Containers: 124
4 changes: 4 additions & 0 deletions resources/2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ Plan:
30 min: Piscine JI part1 (en aveugle?)
30 min: Piscine JI part2 (en aveugle)
* See https://gitlab.in2p3.fr/MaitresNageurs/PiscineJI/tree/master

Et aussi
A tester:
https://github.com/docker/labs/tree/master/beginner
Binary file added slides/2/Docker.pdf
Binary file not shown.
File renamed without changes.

0 comments on commit 8b42f8c

Please sign in to comment.