{"id":2520,"date":"2021-02-24T10:38:01","date_gmt":"2021-02-24T09:38:01","guid":{"rendered":"https:\/\/www.pschatzmann.ch\/home\/?p=2520"},"modified":"2021-03-02T08:54:20","modified_gmt":"2021-03-02T07:54:20","slug":"octoprint-with-docker","status":"publish","type":"post","link":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/","title":{"rendered":"Octoprint with Docker"},"content":{"rendered":"<p>Im using <a href=\"https:\/\/octoprint.org\/\">Octoprint<\/a> for my Ender3 on a old Linux 32 bit machine. Unfortunately I was running into problems after a release upgrade of Ubuntu and so I finally decided that it is time to use Octoprint as a <strong>Docker image<\/strong>, so that I have the possibility to restore my services easily in the future.<\/p>\n<p>For some strange reasons the <a href=\"https:\/\/hub.docker.com\/r\/octoprint\/octoprint\/tags?page=1&amp;ordering=last_updated\">official Octoprint on Docker Hub<\/a> is only supporting 16 bit on ARM but not 16 bit Intel processors! However Octoprint is just a simple <strong>Python application<\/strong>, so it should not be too difficult to have a solution which runs on all environments that are supported by the <a href=\"https:\/\/hub.docker.com\/_\/python\"><strong>official Python Image<\/strong><\/a>.<\/p>\n<p>Here is the solution:<\/p>\n<p><em>Dockerfile<\/em><\/p>\n<pre><code>FROM python\nRUN pip install octoprint\nRUN useradd octoprint &amp;&amp;  usermod -a -G tty octoprint &amp;&amp;  usermod -a -G dialout octoprint\nUSER octoprint\nWORKDIR \/home\/octoprint\nEXPOSE 5000\nCMD octoprint serve\n<\/code><\/pre>\n<p>I am usually also using docker-compose &#8211; so here is the definition:<\/p>\n<p><em>docker-compose.yml<\/em><\/p>\n<pre><code>version: \"3.0\"\nservices:\n  octoprint:\n    ports:\n      - \"80:5000\"\n    restart: always\n    build: .\n    privileged: true\n   volumes:\n      - .:\/home\/octoprint\n\n<\/code><\/pre>\n<p>The <strong>privileged: true<\/strong> setting is necessary to give Docker access to the serial (printer) devices.<br \/>\n The cool thing is<\/p>\n<ul>\n<li>that I can access it directly on <strong>port 80<\/strong> now w\/o the need to install any other proxies<\/li>\n<li>and that I have the <strong>automatic startup<\/strong> automatically taken care of by Docker as well.<\/li>\n<li>Last but not least I can get the solution back on any new environment just by running docker-compose up -d<\/li>\n<\/ul>\n<p>There is one pitfall however: The printer needs to be connected when the service is starting up or the port will not be found!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Im using Octoprint for my Ender3 on a old Linux 32 bit machine. Unfortunately I was running into problems after a release upgrade of Ubuntu and so I finally decided that it is time to use Octoprint as a Docker image, so that I have the possibility to restore my [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2526,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[17],"tags":[],"class_list":["post-2520","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-3d-printing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Octoprint with Docker - Phil Schatzmann<\/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:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Octoprint with Docker - Phil Schatzmann\" \/>\n<meta property=\"og:description\" content=\"Im using Octoprint for my Ender3 on a old Linux 32 bit machine. Unfortunately I was running into problems after a release upgrade of Ubuntu and so I finally decided that it is time to use Octoprint as a Docker image, so that I have the possibility to restore my [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/\" \/>\n<meta property=\"og:site_name\" content=\"Phil Schatzmann\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-24T09:38:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-02T07:54:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/02\/octoprint.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"250\" \/>\n\t<meta property=\"og:image:height\" content=\"201\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"pschatzmann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pschatzmann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/\"},\"author\":{\"name\":\"pschatzmann\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"headline\":\"Octoprint with Docker\",\"datePublished\":\"2021-02-24T09:38:01+00:00\",\"dateModified\":\"2021-03-02T07:54:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/\"},\"wordCount\":225,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/octoprint.jpeg\",\"articleSection\":[\"3D Printing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/\",\"name\":\"Octoprint with Docker - Phil Schatzmann\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/octoprint.jpeg\",\"datePublished\":\"2021-02-24T09:38:01+00:00\",\"dateModified\":\"2021-03-02T07:54:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/octoprint.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/octoprint.jpeg\",\"width\":250,\"height\":201},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/02\\\/24\\\/octoprint-with-docker\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Octoprint with Docker\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\",\"name\":\"Phil Schatzmann Consulting\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\",\"name\":\"pschatzmann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"width\":305,\"height\":305,\"caption\":\"pschatzmann\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Octoprint with Docker - Phil Schatzmann","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:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/","og_locale":"en_US","og_type":"article","og_title":"Octoprint with Docker - Phil Schatzmann","og_description":"Im using Octoprint for my Ender3 on a old Linux 32 bit machine. Unfortunately I was running into problems after a release upgrade of Ubuntu and so I finally decided that it is time to use Octoprint as a Docker image, so that I have the possibility to restore my [&hellip;]","og_url":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/","og_site_name":"Phil Schatzmann","article_published_time":"2021-02-24T09:38:01+00:00","article_modified_time":"2021-03-02T07:54:20+00:00","og_image":[{"width":250,"height":201,"url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/02\/octoprint.jpeg","type":"image\/jpeg"}],"author":"pschatzmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pschatzmann","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/#article","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/"},"author":{"name":"pschatzmann","@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"headline":"Octoprint with Docker","datePublished":"2021-02-24T09:38:01+00:00","dateModified":"2021-03-02T07:54:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/"},"wordCount":225,"commentCount":0,"publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/02\/octoprint.jpeg","articleSection":["3D Printing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/","url":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/","name":"Octoprint with Docker - Phil Schatzmann","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/#primaryimage"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/02\/octoprint.jpeg","datePublished":"2021-02-24T09:38:01+00:00","dateModified":"2021-03-02T07:54:20+00:00","breadcrumb":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/#primaryimage","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/02\/octoprint.jpeg","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/02\/octoprint.jpeg","width":250,"height":201},{"@type":"BreadcrumbList","@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/02\/24\/octoprint-with-docker\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pschatzmann.ch\/home\/"},{"@type":"ListItem","position":2,"name":"Octoprint with Docker"}]},{"@type":"WebSite","@id":"https:\/\/www.pschatzmann.ch\/home\/#website","url":"https:\/\/www.pschatzmann.ch\/home\/","name":"Phil Schatzmann Consulting","description":"","publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pschatzmann.ch\/home\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1","name":"pschatzmann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","width":305,"height":305,"caption":"pschatzmann"},"logo":{"@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png"}}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/2520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/comments?post=2520"}],"version-history":[{"count":25,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/2520\/revisions"}],"predecessor-version":[{"id":2642,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/2520\/revisions\/2642"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media\/2526"}],"wp:attachment":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media?parent=2520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/categories?post=2520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/tags?post=2520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}