mirror of
https://github.com/erkules/container-bauen.git
synced 2025-11-09 00:44:01 +01:00
bin so schön jetzt
This commit is contained in:
parent
e0412a0ceb
commit
b7e5761981
25
README.md
25
README.md
@ -1,10 +1,10 @@
|
|||||||
# Ich
|
# Ich
|
||||||
|
|
||||||
erkan@linsenraum.de
|
* erkan@linsenraum.de
|
||||||
@erkuleswastaken
|
* @erkuleswastaken
|
||||||
xing/linkedin
|
* xing/linkedin
|
||||||
https://devops-training.de/
|
* https://devops-training.de/
|
||||||
https://devops-kubernetes-camp.de/
|
* https://devops-kubernetes-camp.de/
|
||||||
|
|
||||||
Und ja: Freiberufler
|
Und ja: Freiberufler
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ Was haben wir?
|
|||||||
Ist doch wie eine VM
|
Ist doch wie eine VM
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
docker container run --rm -ti --name vorlage ubuntu
|
docker container run --rm -ti --name vorlage alpine
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* Prozessraum
|
* Prozessraum
|
||||||
@ -73,7 +73,7 @@ chroot /tmp/container
|
|||||||
ps ax .. und ein Hups
|
ps ax .. und ein Hups
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Genau das machen was da steht.
|
Genau das machen was da steht. (`mount -t proc proc /proc`)
|
||||||
|
|
||||||
Und schauen ob andere Prozess was in /tmp/container/proc sehen :)
|
Und schauen ob andere Prozess was in /tmp/container/proc sehen :)
|
||||||
|
|
||||||
@ -102,6 +102,7 @@ Achso: wieder ein `pstree` mitlaufen lassen :)
|
|||||||
~~~
|
~~~
|
||||||
mkdir /sys/fs/cgroup/pids/lala
|
mkdir /sys/fs/cgroup/pids/lala
|
||||||
echo 5 >/sys/fs/cgroup/pids/lala/pids.max
|
echo 5 >/sys/fs/cgroup/pids/lala/pids.max
|
||||||
|
|
||||||
echo $$ >/sys/fs/cgroup/pids/lala/tasks
|
echo $$ >/sys/fs/cgroup/pids/lala/tasks
|
||||||
besser?
|
besser?
|
||||||
echo ContainerPid >/sys/fs/cgroup/pids/lala/tasks
|
echo ContainerPid >/sys/fs/cgroup/pids/lala/tasks
|
||||||
@ -130,9 +131,6 @@ mount -t overlay overlay -o lowerdir=/tmp/container,upperdir=/tmp/upper2,workdir
|
|||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
|
||||||
dd
|
|
||||||
|
|
||||||
:
|
|
||||||
|
|
||||||
# Netzwerk?
|
# Netzwerk?
|
||||||
|
|
||||||
@ -153,8 +151,8 @@ ip netns exec hallo ip a s
|
|||||||
ip link add hostende type veth peer name containerende
|
ip link add hostende type veth peer name containerende
|
||||||
ip link set containerende netns hallo
|
ip link set containerende netns hallo
|
||||||
ip netns exec hallo ip a s
|
ip netns exec hallo ip a s
|
||||||
ip netns exec jax ip link set containerende up
|
ip netns exec hallo ip link set containerende up
|
||||||
ip netns exec jax ip a add 172.40.1.1/26 dev containerende
|
ip netns exec hallo ip a add 172.40.1.1/26 dev containerende
|
||||||
ip link set hostende up
|
ip link set hostende up
|
||||||
ip a add 172.40.1.2/26 dev hostende
|
ip a add 172.40.1.2/26 dev hostende
|
||||||
~~~
|
~~~
|
||||||
@ -170,6 +168,9 @@ Haben wir noch Zeit?
|
|||||||
|
|
||||||
Und wenn schon!
|
Und wenn schon!
|
||||||
|
|
||||||
|
* Container ohne Network starten. Mit nsenter Paketer installieren
|
||||||
|
* Netzwerk in einem Container mit Host-Tools debuggen
|
||||||
|
|
||||||
|
|
||||||
# Conclusio
|
# Conclusio
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user