{"id":9088,"date":"2022-06-21T16:50:27","date_gmt":"2022-06-21T21:50:27","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=9088"},"modified":"2022-06-27T15:21:04","modified_gmt":"2022-06-27T20:21:04","slug":"quick-docker-test","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=9088","title":{"rendered":"Quick Docker Test"},"content":{"rendered":"\n<p>I&#8217;m building a quick image to test permissions to a folder structure for a friend &#8230; so I&#8217;m making a quick note about how I&#8217;m building this test image so I don&#8217;t have to keep re-typing it all. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nFROM python:3.7-slim\n\nRUN apt-get update &amp;&amp; apt-get install -y curl --no-install-recommends\n\nRUN mkdir -p \/srv\/ljr\/test\n\n# Create service account\nRUN useradd --comment &quot;my service account&quot; -u 30001 -g 30001 --shell \/sbin\/nologin --no-create-home webuser\n# Copy a bunch of stuff various places under \/srv\n# Set ownership on \/srv folder tree\nRUN chown -R 30001:30001 \/srv\n\nUSER 30001:30001\nENTRYPOINT &#x5B;&quot;\/bin\/bash&quot;, &quot;\/entrypoint.sh&quot;]\n<\/pre><\/div>\n\n\n<h1 class=\"wp-block-heading\">build the image<\/h1>\n\n\n\n<p>docker build -t &#8220;ljr:latest&#8221; .<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Run a transient container that is deleted on exit<\/h1>\n\n\n\n<p>docker run &#8211;rm -it &#8211;entrypoint &#8220;\/bin\/bash&#8221; ljr<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m building a quick image to test permissions to a folder structure for a friend &#8230; so I&#8217;m making a quick note about how I&#8217;m building this test image so I don&#8217;t have to keep re-typing it all. build the image docker build -t &#8220;ljr:latest&#8221; . Run a transient container that is deleted on exit &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[623],"tags":[231],"class_list":["post-9088","post","type-post","status-publish","format-standard","hentry","category-containerized-development-and-deployment","tag-docker"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9088","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9088"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9088\/revisions"}],"predecessor-version":[{"id":9089,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9088\/revisions\/9089"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}