{"id":18563,"date":"2025-03-19T13:13:19","date_gmt":"2025-03-19T13:13:19","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=18563"},"modified":"2025-09-13T10:53:19","modified_gmt":"2025-09-13T10:53:19","slug":"basic-c-develop-container-docker","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=18563","title":{"rendered":"C++ develop container (Docker)"},"content":{"rendered":"<p><strong>Docker file<\/strong><\/p>\n<p>cpp_dev.dockerfile<\/p>\n<pre>\r\nFROM debian:latest\r\n\r\n# Set non-interactive mode to avoid prompts during installation\r\nENV DEBIAN_FRONTEND=noninteractive\r\n\r\n# Install necessary packages\r\nRUN apt-get update && apt-get install -y git cmake make g++ gdb\r\n\r\n# Set working directory\r\nWORKDIR \/workspace\r\n\r\n# Default command to keep the container running\r\nCMD [\"\/bin\/bash\"]\r\n<\/pre>\n<hr>\n<p><strong>Docker image<\/strong><\/p>\n<p>console<\/p>\n<pre>\r\n$ docker buildx build -t \"cpp-dev\" -f \"cpp_dev.dockerfile\" .\r\n$ docker run -it --rm -v \"$(pwd):\/workspace\" cpp-dev\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Docker file cpp_dev.dockerfile FROM debian:latest # Set non-interactive mode to avoid prompts during installation ENV DEBIAN_FRONTEND=noninteractive # Install necessary packages<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[82],"tags":[],"_links":{"self":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18563"}],"collection":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18563"}],"version-history":[{"count":8,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18563\/revisions"}],"predecessor-version":[{"id":19280,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18563\/revisions\/19280"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18563"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}