{"id":68,"date":"2021-07-27T21:06:15","date_gmt":"2021-07-27T21:06:15","guid":{"rendered":"https:\/\/smarthome.bolte-online.net\/?p=68"},"modified":"2022-01-12T17:59:05","modified_gmt":"2022-01-12T17:59:05","slug":"docker-hints","status":"publish","type":"post","link":"https:\/\/smarthome.bolte.name\/?p=68","title":{"rendered":"Docker hints"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I do all this stuff on a Raspberri Pi running raspian and docker. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For now there&#8217;s:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Pi-Hole: <a href=\"https:\/\/pi-hole.net\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/pi-hole.net\/<\/a><\/li><li>openHAB: <a href=\"https:\/\/www.openhab.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.openhab.org\/<\/a><\/li><li>Homer: <a href=\"https:\/\/hub.docker.com\/r\/b4bz\/homer\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/hub.docker.com\/r\/b4bz\/homer<\/a><\/li><li>IObroker: <a href=\"https:\/\/smarthome.buanet.de\/docker\/container-images\/iobroker\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/smarthome.buanet.de\/docker\/container-images\/iobroker\/<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">docker commands<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>docker restart openhab_openhab_1\ndocker status openhab_openhab_1\ndocker container ls\ndocker container ls -a #show all conatiners\ndocker container rm &#91;container id] #delete container\ndocker ps\ndocker images \ndocker rmi &#91;image id] #delete image<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Simple steps to use a new docker image <\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/opt\nmkdir new_docker_dir\ncd new_docker_dir\nnano docker-compose.yml\ndocker-compose up\ndocker-compose up -d<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">docker-compose.yml example<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>---\nversion: \"2\"\nservices:\n  homer:\n    image: b4bz\/homer\n    #To build from source, comment previous line and uncomment below\n    #build: .\n    container_name: homer\n    volumes:\n      -  .\/assets\/:\/www\/assets\n    ports:\n      - 8080:8080\n    #environment:\n    #  - UID=1000\n    #  - GID=1000\n    restart: unless-stopped\n    # to change host dns for this container\n    # I needed this for iobroker\n    dns:\n       - 9.9.9.9\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Connect to docker container<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>docker ps to find CONTAINER ID you want to connect to<\/li><li>docker exec -it &#8211;user root [CONTAINER-ID] bash<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Update a docker container<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>update version string in docker-compose.yml<\/li><li>docker-compose pull<\/li><li>docker-compose down<\/li><li>for pihole:latest delete old container<\/li><li>docker-compose up  (for output)<\/li><li>docker-compose up -d  (to start in background)<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I do all this stuff on a Raspberri Pi running raspian and docker. For now there&#8217;s: Pi-Hole: https:\/\/pi-hole.net\/ openHAB: https:\/\/www.openhab.org\/ Homer: https:\/\/hub.docker.com\/r\/b4bz\/homer IObroker: https:\/\/smarthome.buanet.de\/docker\/container-images\/iobroker\/ docker commands Simple steps to use a new docker image docker-compose.yml example Connect to docker container docker ps to find CONTAINER ID you want to connect to docker exec -it &#8211;user&hellip; <a class=\"more-link\" href=\"https:\/\/smarthome.bolte.name\/?p=68\"><span class=\"screen-reader-text\">Docker hints<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-docker","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Docker hints - Smarthome and more<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/smarthome.bolte.name\/?p=68\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker hints - Smarthome and more\" \/>\n<meta property=\"og:description\" content=\"I do all this stuff on a Raspberri Pi running raspian and docker. For now there&#8217;s: Pi-Hole: https:\/\/pi-hole.net\/ openHAB: https:\/\/www.openhab.org\/ Homer: https:\/\/hub.docker.com\/r\/b4bz\/homer IObroker: https:\/\/smarthome.buanet.de\/docker\/container-images\/iobroker\/ docker commands Simple steps to use a new docker image docker-compose.yml example Connect to docker container docker ps to find CONTAINER ID you want to connect to docker exec -it &#8211;user&hellip; Docker hints weiterlesen\" \/>\n<meta property=\"og:url\" content=\"https:\/\/smarthome.bolte.name\/?p=68\" \/>\n<meta property=\"og:site_name\" content=\"Smarthome and more\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-27T21:06:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-12T17:59:05+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/smarthome.bolte.name\\\/?p=68#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/smarthome.bolte.name\\\/?p=68\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/smarthome.bolte.name\\\/#\\\/schema\\\/person\\\/a103d6a52c795ca597d4c8325094865c\"},\"headline\":\"Docker hints\",\"datePublished\":\"2021-07-27T21:06:15+00:00\",\"dateModified\":\"2022-01-12T17:59:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/smarthome.bolte.name\\\/?p=68\"},\"wordCount\":111,\"commentCount\":0,\"articleSection\":[\"docker\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/smarthome.bolte.name\\\/?p=68#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/smarthome.bolte.name\\\/?p=68\",\"url\":\"https:\\\/\\\/smarthome.bolte.name\\\/?p=68\",\"name\":\"Docker hints - Smarthome and more\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/smarthome.bolte.name\\\/#website\"},\"datePublished\":\"2021-07-27T21:06:15+00:00\",\"dateModified\":\"2022-01-12T17:59:05+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/smarthome.bolte.name\\\/#\\\/schema\\\/person\\\/a103d6a52c795ca597d4c8325094865c\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/smarthome.bolte.name\\\/?p=68#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/smarthome.bolte.name\\\/?p=68\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/smarthome.bolte.name\\\/?p=68#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/smarthome.bolte.name\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Docker hints\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/smarthome.bolte.name\\\/#website\",\"url\":\"https:\\\/\\\/smarthome.bolte.name\\\/\",\"name\":\"Smarthome and more\",\"description\":\"home assistant, openHAB, KNX, HUE\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/smarthome.bolte.name\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/smarthome.bolte.name\\\/#\\\/schema\\\/person\\\/a103d6a52c795ca597d4c8325094865c\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8473a48dd3980e9656bb77325b9158044c07963af0f5852a7c3918537443e409?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8473a48dd3980e9656bb77325b9158044c07963af0f5852a7c3918537443e409?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8473a48dd3980e9656bb77325b9158044c07963af0f5852a7c3918537443e409?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/smarthome.bolte.name\"],\"url\":\"https:\\\/\\\/smarthome.bolte.name\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Docker hints - Smarthome and more","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/smarthome.bolte.name\/?p=68","og_locale":"de_DE","og_type":"article","og_title":"Docker hints - Smarthome and more","og_description":"I do all this stuff on a Raspberri Pi running raspian and docker. For now there&#8217;s: Pi-Hole: https:\/\/pi-hole.net\/ openHAB: https:\/\/www.openhab.org\/ Homer: https:\/\/hub.docker.com\/r\/b4bz\/homer IObroker: https:\/\/smarthome.buanet.de\/docker\/container-images\/iobroker\/ docker commands Simple steps to use a new docker image docker-compose.yml example Connect to docker container docker ps to find CONTAINER ID you want to connect to docker exec -it &#8211;user&hellip; Docker hints weiterlesen","og_url":"https:\/\/smarthome.bolte.name\/?p=68","og_site_name":"Smarthome and more","article_published_time":"2021-07-27T21:06:15+00:00","article_modified_time":"2022-01-12T17:59:05+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"admin","Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/smarthome.bolte.name\/?p=68#article","isPartOf":{"@id":"https:\/\/smarthome.bolte.name\/?p=68"},"author":{"name":"admin","@id":"https:\/\/smarthome.bolte.name\/#\/schema\/person\/a103d6a52c795ca597d4c8325094865c"},"headline":"Docker hints","datePublished":"2021-07-27T21:06:15+00:00","dateModified":"2022-01-12T17:59:05+00:00","mainEntityOfPage":{"@id":"https:\/\/smarthome.bolte.name\/?p=68"},"wordCount":111,"commentCount":0,"articleSection":["docker"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/smarthome.bolte.name\/?p=68#respond"]}]},{"@type":"WebPage","@id":"https:\/\/smarthome.bolte.name\/?p=68","url":"https:\/\/smarthome.bolte.name\/?p=68","name":"Docker hints - Smarthome and more","isPartOf":{"@id":"https:\/\/smarthome.bolte.name\/#website"},"datePublished":"2021-07-27T21:06:15+00:00","dateModified":"2022-01-12T17:59:05+00:00","author":{"@id":"https:\/\/smarthome.bolte.name\/#\/schema\/person\/a103d6a52c795ca597d4c8325094865c"},"breadcrumb":{"@id":"https:\/\/smarthome.bolte.name\/?p=68#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/smarthome.bolte.name\/?p=68"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/smarthome.bolte.name\/?p=68#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/smarthome.bolte.name\/"},{"@type":"ListItem","position":2,"name":"Docker hints"}]},{"@type":"WebSite","@id":"https:\/\/smarthome.bolte.name\/#website","url":"https:\/\/smarthome.bolte.name\/","name":"Smarthome and more","description":"home assistant, openHAB, KNX, HUE","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/smarthome.bolte.name\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Person","@id":"https:\/\/smarthome.bolte.name\/#\/schema\/person\/a103d6a52c795ca597d4c8325094865c","name":"admin","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/secure.gravatar.com\/avatar\/8473a48dd3980e9656bb77325b9158044c07963af0f5852a7c3918537443e409?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8473a48dd3980e9656bb77325b9158044c07963af0f5852a7c3918537443e409?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8473a48dd3980e9656bb77325b9158044c07963af0f5852a7c3918537443e409?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/smarthome.bolte.name"],"url":"https:\/\/smarthome.bolte.name\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/smarthome.bolte.name\/index.php?rest_route=\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smarthome.bolte.name\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smarthome.bolte.name\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smarthome.bolte.name\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smarthome.bolte.name\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68"}],"version-history":[{"count":5,"href":"https:\/\/smarthome.bolte.name\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":78,"href":"https:\/\/smarthome.bolte.name\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions\/78"}],"wp:attachment":[{"href":"https:\/\/smarthome.bolte.name\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smarthome.bolte.name\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smarthome.bolte.name\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}