How to extend nginx docker image without getting error systemctl: command not found? - Stack Overflow (https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196) (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (Stack Overflow) (/opensearch.xml) (https://stackoverflow.com/questions/58429232/how-to-extend-nginx-docker-image-without-getting-error-systemctl-command-not-fo) (https://cdn.sstatic.net/Shared/stacks.css?v=d6a266655a25) (https://cdn.sstatic.net/Sites/stackoverflow/primary.css?v=22fb2cb11723) (Feed for question 'How to extend nginx docker image without getting error systemctl: command not found?') (/feeds/question/58429232) (https://cdn.sstatic.net/Shared/Channels/channels.css?v=5981bb1a5bd7) (https://accounts.google.com/gsi/style) (site logo) Join Stack Overflow By clicking “Sign up”, you agree to our (/legal/terms-of-service/public) terms of service and acknowledge you have read our (/legal/privacy-policy) privacy policy . (59e99b481907aca79504282706e4b1db65c79b5bb11a4cbc1d88997106647265) (1) (2.0) Sign up with Google Sign up with GitHub OR (59e99b481907aca79504282706e4b1db65c79b5bb11a4cbc1d88997106647265) (1) () () () () () () Email Password (8+ characters (at least 1 letter & 1 number)) Sign up Already have an account? (/users/login) Log in (59e99b481907aca79504282706e4b1db65c79b5bb11a4cbc1d88997106647265) () Skip to main content (https://stackoverflow.com) Stack Overflow (https://stackoverflow.co/) About Products (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav-bar&utm_content=overflowai) OverflowAI (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=stack-overflow-for-teams) Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers (https://stackoverflow.co/advertising/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=stack-overflow-advertising) Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=overflow-ai) OverflowAI GenAI features for Teams (https://stackoverflow.co/api-solutions/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=overflow-api) OverflowAPI Train & fine-tune LLMs (https://stackoverflow.co/labs/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=labs) Labs The future of collective knowledge sharing (https://stackoverflow.co/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=about-the-company) About the company (https://stackoverflow.blog/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=blog) Visit the blog (Search…) () Loading… (https://stackoverflow.com) current community (https://stackoverflow.com) (Stack Overflow) Stack Overflow (https://stackoverflow.com/help) help (https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com) chat (https://meta.stackoverflow.com) (Meta Stack Overflow) Meta Stack Overflow your communities (https://stackoverflow.com/users/signup?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f58429232%2fhow-to-extend-nginx-docker-image-without-getting-error-systemctl-command-not-fo) Sign up or (https://stackoverflow.com/users/login?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f58429232%2fhow-to-extend-nginx-docker-image-without-getting-error-systemctl-command-not-fo) log in to customize your list. (https://stackexchange.com/sites) more stack exchange communities (https://stackoverflow.blog) company blog (Click to show search) (https://stackoverflow.com/users/login?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f58429232%2fhow-to-extend-nginx-docker-image-without-getting-error-systemctl-command-not-fo) Log in (https://stackoverflow.com/users/signup?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f58429232%2fhow-to-extend-nginx-docker-image-without-getting-error-systemctl-command-not-fo) Sign up Let's set up your homepage Select a few topics you're interested in: python javascript c# reactjs java android html flutter c++ node.js typescript css r php angular next.js spring-boot machine-learning sql excel ios azure docker Or search from our full list: (Search) javascript python java c# php android html jquery c++ css ios sql mysql r reactjs node.js arrays c asp.net json python-3.x .net ruby-on-rails sql-server swift django angular objective-c excel pandas angularjs regex typescript ruby linux ajax iphone vba xml laravel spring asp.net-mvc database wordpress string flutter postgresql mongodb wpf windows amazon-web-services xcode bash git oracle-database spring-boot dataframe azure firebase list multithreading docker vb.net react-native eclipse algorithm powershell macos visual-studio numpy image forms scala function vue.js performance twitter-bootstrap selenium winforms kotlin loops express dart hibernate sqlite matlab python-2.7 shell rest apache entity-framework android-studio csv maven api linq qt dictionary unit-testing asp.net-core facebook tensorflow apache-spark file swing class unity-game-engine sorting date authentication go symfony t-sql opencv matplotlib .htaccess google-chrome for-loop datetime codeigniter http perl validation sockets google-maps object uitableview xaml oop if-statement visual-studio-code cordova ubuntu web-services email android-layout github spring-mvc elasticsearch kubernetes selenium-webdriver ms-access user-interface parsing ggplot2 pointers google-sheets machine-learning c++11 security google-apps-script flask ruby-on-rails-3 templates nginx variables exception sql-server-2008 gradle debugging tkinter listview delphi jpa asynchronous pdf web-scraping haskell jsp ssl amazon-s3 google-cloud-platform jenkins testing xamarin wcf npm batch-file generics ionic-framework network-programming unix recursion google-app-engine mongoose visual-studio-2010 .net-core android-fragments assembly animation math next.js session svg hadoop intellij-idea curl django-models join rust winapi laravel-5 url heroku http-redirect tomcat google-cloud-firestore inheritance webpack keras image-processing gcc asp.net-mvc-4 logging dom web swiftui matrix pyspark actionscript-3 button post optimization firebase-realtime-database jquery-ui iis cocoa xpath d3.js javafx firefox internet-explorer xslt caching select asp.net-mvc-3 opengl events asp.net-web-api plot dplyr magento encryption search stored-procedures amazon-ec2 ruby-on-rails-4 memory audio canvas multidimensional-array jsf random vector cookies redux input facebook-graph-api flash xamarin.forms indexing arraylist ipad cocoa-touch data-structures video apache-kafka model-view-controller serialization jdbc woocommerce azure-devops routes razor awk servlets mod-rewrite beautifulsoup docker-compose excel-formula filter iframe aws-lambda design-patterns text django-rest-framework visual-c++ cakephp mobile android-intent react-hooks struct methods groovy mvvm ssh lambda checkbox ecmascript-6 google-chrome-extension time grails installation sharepoint cmake shiny spring-security jakarta-ee android-recyclerview plsql core-data types meteor android-activity sed bootstrap-4 websocket activerecord graph replace scikit-learn file-upload group-by vim junit boost deep-learning import sass memory-management error-handling async-await eloquent dynamic soap silverlight dependency-injection charts layout apache-spark-sql deployment browser gridview svn while-loop google-bigquery vuejs2 ffmpeg dll highcharts view foreach plugins makefile c#-4.0 redis reporting-services jupyter-notebook merge server unicode https reflection google-maps-api-3 twitter oauth-2.0 extjs pytorch axios terminal pip split mysqli cmd encoding django-views automation database-design collections hash netbeans build data-binding ember.js tcp sqlalchemy pdo apache-flex concurrency entity-framework-core command-line spring-data-jpa printing react-redux java-8 jestjs service html-table lua neo4j ansible material-ui parameters module enums visual-studio-2012 flexbox promise outlook webview firebase-authentication web-applications uwp jquery-mobile utf-8 datatable python-requests parallel-processing drop-down-menu colors scroll hive scipy tfs count syntax ms-word twitter-bootstrap-3 ssis google-analytics fonts three.js powerbi rxjs constructor graphql file-io paypal discord cassandra socket.io graphics compiler-errors gwt react-router nlp solr url-rewriting backbone.js memory-leaks datatables oauth terraform datagridview drupal oracle11g zend-framework neural-network knockout.js triggers django-forms interface angular-material google-api casting jmeter linked-list path proxy timer django-templates arduino orm directory visual-studio-2015 parse-platform windows-phone-7 cron push-notification conditional-statements primefaces functional-programming pagination model jar xamarin.android hyperlink uiview gitlab visual-studio-2013 vbscript google-cloud-functions azure-active-directory jwt download swift3 sql-server-2005 configuration process pygame rspec properties combobox callback windows-phone-8 linux-kernel safari permissions scrapy raspberry-pi scripting emacs clojure x86 scope io compilation mongodb-query nhibernate responsive-design expo angularjs-directive azure-functions request bluetooth dns 3d binding reference discord.js architecture playframework pyqt version-control doctrine-orm package get sql-server-2012 rubygems f# autocomplete openssl datepicker kendo-ui tree jackson pycharm controller yii nested grep xamarin.ios static dockerfile statistics transactions datagrid null active-directory uiviewcontroller webforms phpmyadmin discord.py notifications computer-vision sas duplicates mocking youtube nullpointerexception yaml menu sum bitmap blazor asp.net-mvc-5 electron visual-studio-2008 time-series yii2 jsf-2 css-selectors stl android-listview floating-point cryptography ant stream hashmap character-encoding msbuild sdk asp.net-core-mvc google-drive-api selenium-chromedriver jboss joomla cors navigation devise anaconda background camera multiprocessing pyqt5 binary cuda frontend linq-to-sql iterator mariadb onclick plotly ios7 rabbitmq android-jetpack-compose android-asynctask microsoft-graph-api tabs insert laravel-4 uicollectionview environment-variables amazon-dynamodb linker console xsd coldfusion upload continuous-integration ftp textview opengl-es operating-system vuejs3 mockito localization macros formatting xml-parsing json.net kivy type-conversion data.table timestamp calendar integer segmentation-fault android-ndk drag-and-drop prolog char crash jasmine automated-tests dependencies geometry android-gradle-plugin itext firebase-cloud-messaging header fortran sprite-kit mfc attributes nuxt.js nosql format azure-pipelines nestjs odoo db2 jquery-plugins jenkins-pipeline leaflet event-handling flutter-layout julia postman annotations keyboard textbox arm visual-studio-2017 gulp libgdx stripe-payments xampp synchronization crystal-reports timezone dom-events uikit azure-web-app-service android-emulator swagger wso2 sequelize.js namespaces aggregation-framework uiscrollview jvm google-sheets-formula chart.js com subprocess geolocation centos webdriver snowflake-cloud-data-platform html5-canvas garbage-collection widget dialog numbers concatenation sql-update qml set windows-10 tuples mapreduce smtp java-stream ionic2 rotation modal-dialog spring-data android-edittext http-headers nuget doctrine radio-button sonarqube grid lucene xmlhttprequest internationalization listbox initialization switch-statement components google-play apache-camel boolean serial-port ldap ios5 youtube-api return gdb pivot latex eclipse-plugin frameworks tags containers github-actions dataset asp-classic label foreign-keys subquery c++17 copy uinavigationcontroller delegates google-cloud-storage migration struts2 base64 protractor sql-server-2008-r2 find embedded queue uibutton arguments composer-php append jaxb zip stack cucumber autolayout ide entity-framework-6 popup iteration airflow tailwind-css windows-7 r-markdown ssl-certificate vb6 gmail hover jqgrid g++ udp Next You’ll be prompted to create an account to view your personalized homepage. (/) Home (/questions) Questions (/tags) Tags (/beta/discussions) Discussions Labs (https://chat.stackoverflow.com/?tab=all&sort=active) Chat (/users) Users (/jobs?source=so-left-nav) Jobs (https://stackoverflow.com/jobs/companies?so_medium=stackoverflow&so_source=SiteNav) Companies Collectives Communities for your favorite technologies. (/collectives-all) Explore all Collectives Teams () Ask questions, find answers and collaborate at work with Stack Overflow for Teams. (https://stackoverflowteams.com/teams/create/free/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams) Try Teams for free (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams) Explore Teams Teams Ask questions, find answers and collaborate at work with Stack Overflow for Teams. (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams-compact) Explore Teams Collectives™ on Stack Overflow Find centralized, trusted content and collaborate around the technologies you use most. (/collectives) Learn more about Collectives Teams Q&A for work Connect and share knowledge within a single location that is structured and easy to search. (https://stackoverflow.co/teams/) Learn more about Teams (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (/questions/58429232/how-to-extend-nginx-docker-image-without-getting-error-systemctl-command-not-fo) How to extend nginx docker image without getting error systemctl: command not found? (/questions/ask) Ask Question (2019-10-17 09:26:04Z) Asked 5 years, 5 months ago Modified (?lastactivity) (2019-10-17 18:24:19Z) 5 years, 5 months ago (Viewed 2,646 times) Viewed 3k times This question shows research effort; it is useful and clear (70:3:31e,16:b9671b3d90a90e3d,10:1743966662,16:298a6235c7c1b5ce,8:58429232,6353abbb70ec2f4ffef2b2b64709aef04a897bb51ff2753d4e043bbf0e87b57a) 1 (This question does not show any research effort; it is unclear or not useful) (70:3:31e,16:7a5102e158b621f0,10:1743966662,16:7f98adb85f115f60,8:58429232,5bd333d8f3be2b628b0580e4392aaa285778b65ca377d37550731e3884f742ff) Save this question. (/posts/58429232/timeline) Show activity on this post. I want to build my own custom docker image from nginx image. I override the ENTRYPOINT of nginx with my own ENTERYPOINT file. Which bring me to ask two questions: I think I lose some commands from nginx by doing so. am I right? (like expose the port.. ) If I want to restart the nginx I run this commands: nginx -t && systemctl reload nginx . but the output is: nginx: configuration file /etc/nginx/nginx.conf test is successful /entrypoint.sh: line 5: systemctl: command not found How to fix that? FROM nginx:latest WORKDIR / RUN echo "deb http://ftp.debian.org/debian stretch-backports main" >> /etc/apt/sources.list RUN apt-get -y update && \ apt-get -y install apt-utils && \ apt-get -y upgrade && \ apt-get -y clean # I ALSO WANT TO INSTALL CERBOT FOR LATER USE (in my entrypoint file) RUN apt-get -y install python-certbot-nginx -t stretch-backports # COPY ./something ./tothisimage # COPY ./something ./tothisimage # COPY ./something ./tothisimage # COPY ./something ./tothisimage COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["bash", "/entrypoint.sh"] entrypoint.sh echo "in entrypoint" # I want to run some commands here... # After I want to run nginx normally.... nginx -t && systemctl reload nginx echo "after reload" (/questions/tagged/docker) (show questions tagged 'docker') docker (/questions/tagged/nginx) (show questions tagged 'nginx') nginx (/q/58429232) (Short permalink to this question) Share Share a link to this question Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/58429232/edit) () Improve this question Follow (70:3:31e,16:3adb933ad5591800,10:1743966662,16:7fc8b8a205b9d15b,8:58429232,ec13cc7cf9378eda58f24d3b63bedd76dd96917a61adbfd6d142cc426444e703) Follow this question to receive notifications asked (2019-10-17 09:26:04Z) Oct 17, 2019 at 9:26 (/users/10932853/jon-sud) (Jon Sud's user avatar) (/users/10932853/jon-sud) Jon Sud Jon Sud (reputation score 11,731) 11.7k (31 gold badges) 31 31 gold badges (103 silver badges) 103 103 silver badges (228 bronze badges) 228 228 bronze badges 0 (Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.) Add a comment | (Expand to show all comments on this post) 3 Answers 3 Sorted by: (/questions/58429232/how-to-extend-nginx-docker-image-without-getting-error-systemctl-command-not-fo?answertab=scoredesc#tab-top) Reset to default (scoredesc) Highest score (default) (trending) Trending (recent votes count more) (modifieddesc) Date modified (newest first) (createdasc) Date created (oldest first) This answer is useful (70:3:31e,16:44838707bb05363e,10:1743966662,16:f0a2099624d900e4,8:58430795,e50c5d4bc452e9d1cfb429f584568e8c5ee67fa28435c8f6775376912cf179d5) 2 (This answer is not useful) (70:3:31e,16:c9df64155ddfd14e,10:1743966662,16:468ef4c3f98aaaa1,8:58430795,5ff8e104a30c44bafcbc5beba5af9df0c22f5ca79d91628922f8fecf6f893c3b) Save this answer. (Loading when this answer was accepted…) (/posts/58430795/timeline) Show activity on this post. Commands like service and systemctl mostly just don't work in Docker, and you should totally ignore them. At the point where your entrypoint script is running, it is literally the only thing that is running. That means you don't need to restart nginx, because it hasn't started the first time yet. The standard pattern here is to use the entrypoint script to do some first-time setup; it will be passed the actual command to run as arguments, so you need to tell it to run them. #!/bin/sh echo "in entrypoint" # ... do first-time setup ... # ...then run the command, nginx or otherwise exec "$@ " (Try running docker run --rm -it myimage /bin/sh . You will get an interactive shell in a new container, but after this first-time setup has happened.) The one thing you do lose in your Dockerfile is the default CMD from the base image (setting an ENTRYPOINT resets that). You need to add back (https://github.com/nginxinc/docker-nginx/blob/23a990403d6dbe102bf2c72ab2f6a239e940e3c3/mainline/buster/Dockerfile#L103) that CMD : COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh" ] CMD ["nginx" , "-g" , "daemon off;" ] You should keep the other settings from the base image, like ENV definitions and EXPOSE d ports. (/a/58430795) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/58430795/edit) () Improve this answer Follow (70:3:31e,16:544feafca003581e,10:1743966662,16:ebe726e8f01807a6,8:58430795,557467d93f5b8578dcfe1a505f4621e72e324a69a78fb9b0cc87423aed401f80) Follow this answer to receive notifications answered (2019-10-17 10:47:43Z) Oct 17, 2019 at 10:47 (/users/10008173/david-maze) (David Maze's user avatar) (/users/10008173/david-maze) David Maze David Maze (reputation score 160,839) 161k (46 gold badges) 46 46 gold badges (249 silver badges) 249 249 silver badges (289 bronze badges) 289 289 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:9ba7a8653ca4b665,10:1743966662,16:7fff8c6b6627b84f,8:58429456,97b63a6984b5ed278a2c77628cf80413a9408cc163495d442bdfff092cfa6d72) 1 (This answer is not useful) (70:3:31e,16:aef7ad86206f5e23,10:1743966662,16:3c310c797a649319,8:58429456,8d4567e5b91499960d749f4a9be89dfa89d01bfbd62b090256bffb62449aea0d) Save this answer. (Loading when this answer was accepted…) (/posts/58429456/timeline) Show activity on this post. this will work using service command: echo "in entrypoint" # I want to run some commands here... # After I want to run nginx normally.... nginx -t && service nginx reload echo "after reload" output: in entrypoint nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful Restarting nginx: nginx. after reload (/a/58429456) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/58429456/edit) () Improve this answer Follow (70:3:31e,16:2117816cb1d40c51,10:1743966662,16:7eabd6f371126c59,8:58429456,e74703e17b417d344548fdd9081149b02a62ea5998c312eca80cd16a90cf361d) Follow this answer to receive notifications answered (2019-10-17 09:36:14Z) Oct 17, 2019 at 9:36 (/users/8192635/linpy) (LinPy's user avatar) (/users/8192635/linpy) LinPy LinPy (reputation score 18,638) 18.6k (5 gold badges) 5 5 gold badges (46 silver badges) 46 46 silver badges (63 bronze badges) 63 63 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:a45efb02fba4efd1,10:1743966662,16:e7bba0df46c49379,8:58438665,33ade6bfeb2bbf6b3877b0b46e6bc99947031882209d51a37075b4f35c990c64) 1 (This answer is not useful) (70:3:31e,16:8ff3e07cdfc9e3de,10:1743966662,16:53aabaebf74118c1,8:58438665,c99b4428e5fcdb0e1fbf592318ce3628cae0adbebb92129cee9cb461c9a2731b) Save this answer. (Loading when this answer was accepted…) (/posts/58438665/timeline) Show activity on this post. The "systemctl" command is specific to some SystemD based operating system. But you do not have such a SystemD daemon running on PID 1 - so even if you install those packages it wont work. You can only check in the nginx.service file which command the "reload" would execute for real. Or have something like the (https://github.com/gdraheim/docker-systemctl-replacement) docker-systemctl-replacement script do it for you. (/a/58438665) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/58438665/edit) () Improve this answer Follow (70:3:31e,16:c7a2a0f6a1e5c19e,10:1743966662,16:b49f27692db51d58,8:58438665,aa1440faa235ab8206e52e7d0ef91fd358eaaf38b97596f1dc95209fdd5a0011) Follow this answer to receive notifications answered (2019-10-17 18:24:19Z) Oct 17, 2019 at 18:24 (/users/2319089/guido-u-draheim) (Guido U. Draheim's user avatar) (/users/2319089/guido-u-draheim) Guido U. Draheim Guido U. Draheim (reputation score) 3,296 (1 gold badge) 1 1 gold badge (22 silver badges) 22 22 silver badges (20 bronze badges) 20 20 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) (58429232) (false) () (0) Your Answer (True) Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question . Provide details and share your research! But avoid … Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our (/help/how-to-answer) tips on writing great answers . Draft saved Draft discarded (59e99b481907aca79504282706e4b1db65c79b5bb11a4cbc1d88997106647265) Sign up or (/users/login?ssrc=question_page&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f58429232%2fhow-to-extend-nginx-docker-image-without-getting-error-systemctl-command-not-fo%23new-answer) log in Sign up using Google Sign up using Email and Password (false) (false) Submit Post as a guest Name () () Email Required, but never shown () () Post as a guest Name () () Email Required, but never shown () () Post Your Answer Discard By clicking “Post Your Answer”, you agree to our (https://stackoverflow.com/legal/terms-of-service/public) terms of service and acknowledge you have read our (https://stackoverflow.com/legal/privacy-policy) privacy policy .(1) Start asking to get answers Find the answer to your question by asking. (/questions/ask) Ask question Explore related questions (/questions/tagged/docker) (show questions tagged 'docker') docker (/questions/tagged/nginx) (show questions tagged 'nginx') nginx See similar questions with these tags. The Overflow Blog (https://stackoverflow.blog/2025/04/03/from-training-to-inference-the-new-role-of-web-data-in-llms/?cb=1) From training to inference: The new role of web data in LLMs (https://stackoverflow.blog/2025/04/04/is-ai-a-bubble-or-a-revolution-the-answer-is-yes/?cb=1) Is AI a bubble or a revolution? The answer is yes. Featured on Meta (Meta Stack Exchange) (https://meta.stackexchange.com/questions/407927/changes-to-reporting-for-the-status-review-escalation-process?cb=1) Changes to reporting for the [status-review] escalation process (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/421831/policy-generative-ai-e-g-chatgpt-is-banned?cb=1) Policy: Generative AI (e.g., ChatGPT) is banned (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/433466/a-discussion-about-closed-and-potentially-useful-posts-on-stack-overflow?cb=1) A discussion about closed (and potentially useful) posts on Stack Overflow Related (https://stackoverflow.com/q/22325943?rq=3) (Question score (upvotes - downvotes)) 3 (https://stackoverflow.com/questions/22325943/how-to-run-nginx-with-docker-container?rq=3) How to run nginx with docker container? (https://stackoverflow.com/q/24241292?rq=3) (Question score (upvotes - downvotes)) 64 (https://stackoverflow.com/questions/24241292/dockerized-nginx-is-not-starting?rq=3) Dockerized nginx is not starting (https://stackoverflow.com/q/30151436?rq=3) (Question score (upvotes - downvotes)) 66 (https://stackoverflow.com/questions/30151436/how-to-run-nginx-docker-container-with-custom-config?rq=3) How to run Nginx docker container with custom config? (https://stackoverflow.com/q/42319649?rq=3) (Question score (upvotes - downvotes)) 8 (https://stackoverflow.com/questions/42319649/docker-custom-nginx-container-failed-to-start?rq=3) docker custom nginx container failed to start (https://stackoverflow.com/q/46866055?rq=3) (Question score (upvotes - downvotes)) 2 (https://stackoverflow.com/questions/46866055/docker-command-not-running?rq=3) docker command not running (https://stackoverflow.com/q/51120094?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/51120094/docker-service-command-works-but-systemctl-command-doesnt-work?rq=3) Docker: "service" command works but "systemctl" command doesn't work (https://stackoverflow.com/q/51393564?rq=3) (Question score (upvotes - downvotes)) 2 (https://stackoverflow.com/questions/51393564/couldnt-start-nginx-proxy-docker-image-with-error-contents-of-etc-nginx-conf?rq=3) Couldn't start nginx-proxy docker image with error "Contents of /etc/nginx/conf.d/default.conf did not change" (https://stackoverflow.com/q/52677025?rq=3) (Question score (upvotes - downvotes)) 3 (https://stackoverflow.com/questions/52677025/docker-fails-to-copy-nginx-conf?rq=3) Docker fails to copy nginx conf (https://stackoverflow.com/q/60928901?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/60928901/systemctl-command-doesnt-work-inside-docker-container?rq=3) systemctl command doesn't work inside docker-container (https://stackoverflow.com/q/66205286?rq=3) (Question score (upvotes - downvotes)) 5 (https://stackoverflow.com/questions/66205286/enable-systemctl-in-docker-container?rq=3) Enable systemctl in Docker container (https://stackexchange.com/questions?tab=hot) Hot Network Questions (Stack Overflow) (https://stackoverflow.com/questions/79553314/why-does-kr-say-that-pointers-are-preferable-to-arrays-as-function-parameters) Why does K&R say that pointers are preferable to arrays as function parameters? (Electrical Engineering Stack Exchange) (https://electronics.stackexchange.com/questions/743200/does-neutral-wire-carry-power) Does neutral wire carry power? (German Language Stack Exchange) (https://german.stackexchange.com/questions/79047/extending-a-dative-case-phrase) Extending a dative case phrase (History Stack Exchange) (https://history.stackexchange.com/questions/77639/did-jules-verne-not-know-how-high-the-rockies-are) Did Jules Verne not know how high the Rockies are? (Electrical Engineering Stack Exchange) (https://electronics.stackexchange.com/questions/743097/is-an-8-bit-oscilloscope-for-fpga-signal-measurement-sufficient) Is an 8 bit oscilloscope for FPGA signal measurement sufficient? (Economics Stack Exchange) (https://economics.stackexchange.com/questions/60216/doesnt-a-negative-compensating-variation-cv-mean-the-change-is-good-while-po) Doesn't a negative compensating variation (CV) mean the change is good (while positive means it's bad)? (Politics Stack Exchange) (https://politics.stackexchange.com/questions/91302/would-control-of-the-faroe-islands-suffice-to-keep-denmark-in-the-arctic-council) Would control of the Faroe Islands suffice to keep Denmark in the Arctic Council if Greenland became independent? (Electrical Engineering Stack Exchange) (https://electronics.stackexchange.com/questions/743164/can-decoupling-capacitors-still-do-their-job-when-placed-on-the-back-layer) Can decoupling capacitors still do their job when placed on the back layer? (Cross Validated) (https://stats.stackexchange.com/questions/663575/regression-based-on-rank-observations) Regression based on rank observations (Mathematics Stack Exchange) (https://math.stackexchange.com/questions/5053314/convergence-of-norm-of-sequence-of-invertible-elements-in-a-banach-algebra-anot) Convergence of norm of sequence of invertible elements in a Banach Algebra (another proof) (Puzzling Stack Exchange) (https://puzzling.stackexchange.com/questions/131286/an-excellent-description) An excellent description (Movies & TV Stack Exchange) (https://movies.stackexchange.com/questions/125014/why-is-the-movie-titled-the-brutalist) Why is the movie titled "The Brutalist"? (Academia Stack Exchange) (https://academia.stackexchange.com/questions/217742/as-junior-faculty-i-essentially-have-to-be-sys-admin-for-my-groups-compute-ser) As junior faculty, I essentially have to be sys admin for my group's compute server. Can I negotiate to get something in exchange for this? (Philosophy Stack Exchange) (https://philosophy.stackexchange.com/questions/123989/is-there-any-tradition-to-stay-without-god-not-about-atheism) Is there any tradition to stay without God (not about atheism)? (Stack Overflow) (https://stackoverflow.com/questions/79555310/implicit-declaration-of-standard-function-in-c) Implicit declaration of standard function in C (Politics Stack Exchange) (https://politics.stackexchange.com/questions/91305/is-it-possible-to-charge-different-tariffs-on-different-parts-of-the-same-countr) Is it possible to charge different tariffs on different parts of the same country? (Unix & Linux Stack Exchange) (https://unix.stackexchange.com/questions/793355/failing-hdd-causes-boot-hangs-and-became-unreadable-how-to-fix-this-problem) Failing HDD causes boot hangs and became unreadable. how to fix this problem? (Movies & TV Stack Exchange) (https://movies.stackexchange.com/questions/125017/what-language-is-captain-america-speaking-when-talking-to-batroc-in-winter-soldi) What language is Captain America speaking when talking to Batroc in Winter Soldier? (Electrical Engineering Stack Exchange) (https://electronics.stackexchange.com/questions/743190/voltage-unit-in-transistor-datasheet) Voltage Unit in Transistor Datasheet (Politics Stack Exchange) (https://politics.stackexchange.com/questions/91277/what-are-the-advantages-for-the-us-in-starting-a-trade-war-with-everyone-else-at) What are the advantages for the US in starting a trade war with everyone else at the same time? (Puzzling Stack Exchange) (https://puzzling.stackexchange.com/questions/131293/two-circles-and-a-pentagon) Two circles and a pentagon (Puzzling Stack Exchange) (https://puzzling.stackexchange.com/questions/131301/what-was-the-checkmating-move) What was the checkmating move? (Arqade) (https://gaming.stackexchange.com/questions/411753/will-switch-2-also-support-original-switch-joy-cons) Will Switch 2 also support original Switch Joy-Cons? (Science Fiction & Fantasy Stack Exchange) (https://scifi.stackexchange.com/questions/295889/why-the-title-world-enough-and-time-for-the-doctor-who-episode) Why the title "World Enough and Time" for the Doctor Who episode? (/feeds/question/58429232) (Feed of this question and its answers) Question feed Subscribe to RSS Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader. (https://stackoverflow.com/feeds/question/58429232) () (https://stackoverflow.com) (https://stackoverflow.com) Stack Overflow (/questions) Questions (/help) Help (https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com) Chat (https://stackoverflow.co/) Products (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=teams) Teams (https://stackoverflow.co/advertising/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=advertising) Advertising (https://stackoverflow.co/advertising/employer-branding/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=talent) Talent (https://stackoverflow.co/) Company (https://stackoverflow.co/) About (https://stackoverflow.co/company/press/) Press (https://stackoverflow.co/company/work-here/) Work Here (https://stackoverflow.com/legal) Legal (https://stackoverflow.com/legal/privacy-policy) Privacy Policy (https://stackoverflow.com/legal/terms-of-service/public) Terms of Service (/contact) Contact Us Your Privacy Choices (https://stackoverflow.com/legal/cookie-policy) Cookie Policy (https://stackexchange.com) Stack Exchange Network (https://stackexchange.com/sites#technology) Technology (https://stackexchange.com/sites#culturerecreation) Culture & recreation (https://stackexchange.com/sites#lifearts) Life & arts (https://stackexchange.com/sites#science) Science (https://stackexchange.com/sites#professional) Professional (https://stackexchange.com/sites#business) Business (https://api.stackexchange.com/) API (https://data.stackexchange.com/) Data (https://stackoverflow.blog?blb=1) Blog (https://www.facebook.com/officialstackoverflow/) Facebook (https://twitter.com/stackoverflow) Twitter (https://linkedin.com/company/stack-overflow) LinkedIn (https://www.instagram.com/thestackoverflow) Instagram Site design / logo © 2025 Stack Exchange Inc; user contributions licensed under (https://stackoverflow.com/help/licensing) CC BY-SA . rev 2025.4.4.24803