{"id":19600,"date":"2022-09-22T07:28:08","date_gmt":"2022-09-22T05:28:08","guid":{"rendered":"http:\/\/blog.wenzlaff.de\/?p=19600"},"modified":"2022-10-06T17:39:44","modified_gmt":"2022-10-06T15:39:44","slug":"docker-auf-dem-raspberry-pi-zero-in-15-minuten","status":"publish","type":"post","link":"http:\/\/blog.wenzlaff.de\/?p=19600","title":{"rendered":"Docker auf dem Raspberry Pi Zero in 15 Minuten"},"content":{"rendered":"<p><a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2016\/04\/docker.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2016\/04\/docker.png\" alt=\"\" width=\"611\" height=\"256\" class=\"aligncenter size-full wp-image-7946\" \/><\/a><\/p>\n<p><a href=\"https:\/\/de.wikipedia.org\/wiki\/Docker_(Software)\" target=\"_blank\" rel=\"noopener\">Docker<\/a> ist schnell installiert, einfach nach der Aktuallisierung des Systems folgenden Befehl eingeben:<!--more--><\/p>\n<pre class=\"lang:default decode:true \" >\r\ncurl -sSL https:\/\/get.docker.com | sh\r\n<\/pre>\n<p>Nun wollen wir den Docker-Kontainer mal schnell testen, in dem wir ein <a href=\"https:\/\/alpinelinux.org\/\" target=\"_blank\" rel=\"noopener\">Alpinelinux<\/a> laden und in einer Shell starten, da es nur ein paar MB sind, die geladen werden m\u00fcssen:<\/p>\n<pre class=\"lang:default decode:true \" >sudo docker run -ti alpine:latest \/bin\/sh<\/pre>\n<p>Dann schauen wir doch mal, ob das Alpinelinux l\u00e4uft:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2022\/09\/wenzlaff.de-2022-09-21-um-21.40.15.png\" alt=\"\" width=\"2562\" height=\"226\" class=\"aligncenter size-full wp-image-19601\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2022\/09\/wenzlaff.de-2022-09-21-um-21.40.15.png 2562w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2022\/09\/wenzlaff.de-2022-09-21-um-21.40.15-300x26.png 300w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2022\/09\/wenzlaff.de-2022-09-21-um-21.40.15-1024x90.png 1024w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2022\/09\/wenzlaff.de-2022-09-21-um-21.40.15-768x68.png 768w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2022\/09\/wenzlaff.de-2022-09-21-um-21.40.15-1536x135.png 1536w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2022\/09\/wenzlaff.de-2022-09-21-um-21.40.15-2048x181.png 2048w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>Ok, es l\u00e4uft.<\/p>\n<p>Dann mal ein <a href=\"https:\/\/prometheus.io\/\" rel=\"noopener\" target=\"_blank\">Prometheus<\/a> Server laufen lassen:<\/p>\n<p>sudo docker run &#8211;detach &#8211;name hello-world-prometheus &#8211;publish 8000:8080 infrastructureascode\/hello-world<\/p>\n<p>Abfrage dann mit:<\/p>\n<p>curl http:\/\/0.0.0.0:8000\/metrics<\/p>\n<p>Ergebnis:<\/p>\n<pre class=\"theme:dark-terminal minimize:true lang:default decode:true \" ># HELP gin_request_duration_seconds The HTTP request latencies in seconds.\r\n# TYPE gin_request_duration_seconds histogram\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"0.005\"} 1\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"0.01\"} 1\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"0.025\"} 1\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"0.05\"} 1\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"0.1\"} 1\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"0.25\"} 1\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"0.5\"} 1\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"1\"} 1\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"2.5\"} 1\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"5\"} 1\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"10\"} 1\r\ngin_request_duration_seconds_bucket{code=\"200\",method=\"GET\",url=\"\/health\",le=\"+Inf\"} 1\r\ngin_request_duration_seconds_sum{code=\"200\",method=\"GET\",url=\"\/health\"} 9.8997e-05\r\ngin_request_duration_seconds_count{code=\"200\",method=\"GET\",url=\"\/health\"} 1\r\n# HELP gin_request_size_bytes The HTTP request sizes in bytes.\r\n# TYPE gin_request_size_bytes summary\r\ngin_request_size_bytes_sum 60\r\ngin_request_size_bytes_count 1\r\n# HELP gin_requests_total How many HTTP requests processed, partitioned by status code and HTTP method.\r\n# TYPE gin_requests_total counter\r\ngin_requests_total{code=\"200\",handler=\"main.healthFunc\",host=\"0.0.0.0:8000\",method=\"GET\",url=\"\/health\"} 1\r\n# HELP gin_response_size_bytes The HTTP response sizes in bytes.\r\n# TYPE gin_response_size_bytes summary\r\ngin_response_size_bytes_sum 0\r\ngin_response_size_bytes_count 1\r\n# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.\r\n# TYPE go_gc_duration_seconds summary\r\ngo_gc_duration_seconds{quantile=\"0\"} 0\r\ngo_gc_duration_seconds{quantile=\"0.25\"} 0\r\ngo_gc_duration_seconds{quantile=\"0.5\"} 0\r\ngo_gc_duration_seconds{quantile=\"0.75\"} 0\r\ngo_gc_duration_seconds{quantile=\"1\"} 0\r\ngo_gc_duration_seconds_sum 0\r\ngo_gc_duration_seconds_count 0\r\n# HELP go_goroutines Number of goroutines that currently exist.\r\n# TYPE go_goroutines gauge\r\ngo_goroutines 7\r\n# HELP go_info Information about the Go environment.\r\n# TYPE go_info gauge\r\ngo_info{version=\"go1.15.14\"} 1\r\n# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.\r\n# TYPE go_memstats_alloc_bytes gauge\r\ngo_memstats_alloc_bytes 1.840544e+06\r\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.\r\n# TYPE go_memstats_alloc_bytes_total counter\r\ngo_memstats_alloc_bytes_total 1.840544e+06\r\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.\r\n# TYPE go_memstats_buck_hash_sys_bytes gauge\r\ngo_memstats_buck_hash_sys_bytes 3794\r\n# HELP go_memstats_frees_total Total number of frees.\r\n# TYPE go_memstats_frees_total counter\r\ngo_memstats_frees_total 2474\r\n# HELP go_memstats_gc_cpu_fraction The fraction of this program's available CPU time used by the GC since the program started.\r\n# TYPE go_memstats_gc_cpu_fraction gauge\r\ngo_memstats_gc_cpu_fraction 0\r\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.\r\n# TYPE go_memstats_gc_sys_bytes gauge\r\ngo_memstats_gc_sys_bytes 849920\r\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.\r\n# TYPE go_memstats_heap_alloc_bytes gauge\r\ngo_memstats_heap_alloc_bytes 1.840544e+06\r\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.\r\n# TYPE go_memstats_heap_idle_bytes gauge\r\ngo_memstats_heap_idle_bytes 1.400832e+06\r\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.\r\n# TYPE go_memstats_heap_inuse_bytes gauge\r\ngo_memstats_heap_inuse_bytes 2.49856e+06\r\n# HELP go_memstats_heap_objects Number of allocated objects.\r\n# TYPE go_memstats_heap_objects gauge\r\ngo_memstats_heap_objects 19642\r\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.\r\n# TYPE go_memstats_heap_released_bytes gauge\r\ngo_memstats_heap_released_bytes 1.368064e+06\r\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.\r\n# TYPE go_memstats_heap_sys_bytes gauge\r\ngo_memstats_heap_sys_bytes 3.899392e+06\r\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\r\n# TYPE go_memstats_last_gc_time_seconds gauge\r\ngo_memstats_last_gc_time_seconds 0\r\n# HELP go_memstats_lookups_total Total number of pointer lookups.\r\n# TYPE go_memstats_lookups_total counter\r\ngo_memstats_lookups_total 0\r\n# HELP go_memstats_mallocs_total Total number of mallocs.\r\n# TYPE go_memstats_mallocs_total counter\r\ngo_memstats_mallocs_total 22116\r\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.\r\n# TYPE go_memstats_mcache_inuse_bytes gauge\r\ngo_memstats_mcache_inuse_bytes 868\r\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.\r\n# TYPE go_memstats_mcache_sys_bytes gauge\r\ngo_memstats_mcache_sys_bytes 16384\r\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.\r\n# TYPE go_memstats_mspan_inuse_bytes gauge\r\ngo_memstats_mspan_inuse_bytes 21280\r\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.\r\n# TYPE go_memstats_mspan_sys_bytes gauge\r\ngo_memstats_mspan_sys_bytes 32768\r\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.\r\n# TYPE go_memstats_next_gc_bytes gauge\r\ngo_memstats_next_gc_bytes 4.473924e+06\r\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.\r\n# TYPE go_memstats_other_sys_bytes gauge\r\ngo_memstats_other_sys_bytes 420142\r\n# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.\r\n# TYPE go_memstats_stack_inuse_bytes gauge\r\ngo_memstats_stack_inuse_bytes 294912\r\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.\r\n# TYPE go_memstats_stack_sys_bytes gauge\r\ngo_memstats_stack_sys_bytes 294912\r\n# HELP go_memstats_sys_bytes Number of bytes obtained from system.\r\n# TYPE go_memstats_sys_bytes gauge\r\ngo_memstats_sys_bytes 5.517312e+06\r\n# HELP go_threads Number of OS threads created.\r\n# TYPE go_threads gauge\r\ngo_threads 4\r\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\r\n# TYPE process_cpu_seconds_total counter\r\nprocess_cpu_seconds_total 0.44\r\n# HELP process_max_fds Maximum number of open file descriptors.\r\n# TYPE process_max_fds gauge\r\nprocess_max_fds 1.048576e+06\r\n# HELP process_open_fds Number of open file descriptors.\r\n# TYPE process_open_fds gauge\r\nprocess_open_fds 9\r\n# HELP process_resident_memory_bytes Resident memory size in bytes.\r\n# TYPE process_resident_memory_bytes gauge\r\nprocess_resident_memory_bytes 1.1350016e+07\r\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\r\n# TYPE process_start_time_seconds gauge\r\nprocess_start_time_seconds 1.66379207029e+09\r\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\r\n# TYPE process_virtual_memory_bytes gauge\r\nprocess_virtual_memory_bytes 8.23549952e+08\r\n# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.\r\n# TYPE process_virtual_memory_max_bytes gauge\r\nprocess_virtual_memory_max_bytes 1.8446744073709552e+19\r\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\r\n# TYPE promhttp_metric_handler_requests_in_flight gauge\r\npromhttp_metric_handler_requests_in_flight 1\r\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\r\n# TYPE promhttp_metric_handler_requests_total counter\r\npromhttp_metric_handler_requests_total{code=\"200\"} 0\r\npromhttp_metric_handler_requests_total{code=\"500\"} 0\r\npromhttp_metric_handler_requests_total{code=\"503\"} 0<\/pre>\n<p>Infos zu dem <a href=\"https:\/\/hub.docker.com\/r\/armv6l\/hello-world\" rel=\"noopener\" target=\"_blank\">infrastructureascode\/hello-world<\/a>.<\/p>\n<p>Welches Image findet ihr gut?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker ist schnell installiert, einfach nach der Aktuallisierung des Systems folgenden Befehl eingeben:<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[220,1023,2752],"tags":[5286,2502,2178,5287,2789],"class_list":["post-19600","post","type-post","status-publish","format-standard","hentry","category-anleitung","category-raspberry-pi","category-raspberry-pi-zero-w","tag-alpine","tag-docker","tag-java","tag-prometheus","tag-zero"],"_links":{"self":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/19600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19600"}],"version-history":[{"count":0,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/19600\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19600"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}