{"id":2189,"date":"2021-12-22T16:52:57","date_gmt":"2021-12-22T21:52:57","guid":{"rendered":"https:\/\/shirishranjit.com\/blog1\/?page_id=2189"},"modified":"2022-11-25T10:18:51","modified_gmt":"2022-11-25T15:18:51","slug":"docker-build-tidbits","status":"publish","type":"page","link":"https:\/\/shirishranjit.com\/blog1\/big-data\/docker-primer\/docker-build-tidbits","title":{"rendered":"Docker Build Tidbits"},"content":{"rendered":"\n<p>Freeing space in docker build machine<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#Prune everything. This works well and frees your disk spaces\ndocker system prune\n\n#following are few other pruning commands\ndocker image prune\ndocker image prune -a\ndocker container prune\n\n\n\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Docker Build Issues and resolutions<\/h2>\n\n\n\n<p>When you want to remove folder or file in Docker, you need to remove in separate RUN command.<\/p>\n\n\n\n<p>However, there is not a easy way to remove a directory or file in docker<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Docker how to setup sudo<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod u+w \/etc\/sudoers\necho \"ALL          ALL = {ALL}  NOPASSWD:   ALL\"&gt;&gt;\/etc\/sudoerss<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Useful Docker Commands<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>docker ps --filter status=running<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Pruning referenced: <a href=\"https:\/\/docs.docker.com\/config\/pruning\/\">https:\/\/docs.docker.com\/config\/pruning\/<\/a><\/li><li>Redhat docker build info: <a href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux_atomic_host\/7\/html\/getting_started_with_containers\/using_red_hat_universal_base_images_standard_minimal_and_runtimes\">https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux_atomic_host\/7\/html\/getting_started_with_containers\/using_red_hat_universal_base_images_standard_minimal_and_runtimes<\/a><\/li><li><\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=Docker+Build+Tidbits\" class=\"twitter-share-button\" data-via=\"\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/shirishranjit.com\/blog1\/big-data\/docker-primer\/docker-build-tidbits\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><div class=\"twttr_followme\">\n\t\t\t\t\t\t<a href=\"https:\/\/twitter.com\/shiranjit\" class=\"twitter-follow-button\" data-size=\"default\"  data-show-screen-name=\"false\"  target=\"_blank\">Follow me<\/a>\n\t\t\t\t\t<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Freeing space in docker build machine Docker Build Issues and resolutions When you want to remove folder or file in Docker, you need to remove in separate RUN command. However, there is not a easy way to remove a directory &hellip; <a href=\"https:\/\/shirishranjit.com\/blog1\/big-data\/docker-primer\/docker-build-tidbits\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"parent":2199,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2189","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/2189"}],"collection":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/comments?post=2189"}],"version-history":[{"count":9,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/2189\/revisions"}],"predecessor-version":[{"id":2358,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/2189\/revisions\/2358"}],"up":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/2199"}],"wp:attachment":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/media?parent=2189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}