docker-compose error "read-only file system" - 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/53143849/docker-compose-error-read-only-file-system) (https://cdn.sstatic.net/Shared/stacks.css?v=d6a266655a25) (https://cdn.sstatic.net/Sites/stackoverflow/primary.css?v=7d8876444382) (Feed for question 'docker-compose error "read-only file system"') (/feeds/question/53143849) (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 . (9b9d1ff1208457cf29de4d03e17fc06b55f301e0c5c48e7398c73e63b318268a) (1) (2.0) Sign up with Google Sign up with GitHub OR (9b9d1ff1208457cf29de4d03e17fc06b55f301e0c5c48e7398c73e63b318268a) (1) () () () () () () Email Password (8+ characters (at least 1 letter & 1 number)) Sign up Already have an account? (/users/login) Log in (9b9d1ff1208457cf29de4d03e17fc06b55f301e0c5c48e7398c73e63b318268a) () 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%2f53143849%2fdocker-compose-error-read-only-file-system) Sign up or (https://stackoverflow.com/users/login?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f53143849%2fdocker-compose-error-read-only-file-system) 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%2f53143849%2fdocker-compose-error-read-only-file-system) Log in (https://stackoverflow.com/users/signup?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f53143849%2fdocker-compose-error-read-only-file-system) 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 facebook asp.net-core 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 elasticsearch spring-mvc kubernetes selenium-webdriver ms-access user-interface parsing ggplot2 pointers machine-learning google-sheets security c++11 flask google-apps-script ruby-on-rails-3 nginx templates 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 next.js math session svg hadoop intellij-idea curl django-models join rust laravel-5 winapi url heroku http-redirect tomcat google-cloud-firestore inheritance webpack keras image-processing gcc asp.net-mvc-4 logging web dom 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 facebook-graph-api input flash xamarin.forms indexing arraylist ipad cocoa-touch data-structures video apache-kafka model-view-controller serialization jdbc woocommerce routes azure-devops razor awk servlets mod-rewrite beautifulsoup docker-compose excel-formula iframe filter aws-lambda design-patterns text django-rest-framework visual-c++ cakephp mobile android-intent react-hooks struct methods groovy mvvm ssh lambda checkbox google-chrome-extension ecmascript-6 time installation grails sharepoint cmake shiny spring-security jakarta-ee android-recyclerview plsql core-data types meteor android-activity sed websocket bootstrap-4 activerecord graph replace scikit-learn file-upload group-by vim junit boost deep-learning import sass memory-management error-handling async-await dynamic eloquent 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 django-views encoding automation database-design collections netbeans hash build data-binding ember.js tcp sqlalchemy pdo apache-flex concurrency entity-framework-core command-line spring-data-jpa printing java-8 react-redux jestjs service html-table neo4j lua ansible parameters material-ui 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 constructor rxjs graphql file-io paypal discord cassandra socket.io graphics compiler-errors gwt react-router nlp solr url-rewriting backbone.js memory-leaks datatables oauth datagridview terraform drupal oracle11g zend-framework neural-network knockout.js triggers django-forms interface google-api angular-material 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 rspec pygame properties combobox callback windows-phone-8 linux-kernel safari permissions scrapy raspberry-pi scripting emacs clojure x86 scope io compilation mongodb-query expo nhibernate responsive-design angularjs-directive request azure-functions bluetooth 3d dns binding reference discord.js architecture playframework version-control pyqt doctrine-orm package pycharm get sql-server-2012 rubygems f# autocomplete openssl datepicker kendo-ui tree jackson controller yii grep nested xamarin.ios static dockerfile statistics transactions datagrid null active-directory uiviewcontroller phpmyadmin webforms discord.py notifications sas computer-vision duplicates mocking youtube nullpointerexception yaml menu sum bitmap electron asp.net-mvc-5 time-series visual-studio-2008 blazor yii2 jsf-2 css-selectors stl android-listview floating-point cryptography ant stream hashmap character-encoding sdk msbuild asp.net-core-mvc google-drive-api selenium-chromedriver jboss joomla cors navigation devise anaconda background camera multiprocessing pyqt5 binary frontend cuda linq-to-sql iterator mariadb onclick plotly ios7 rabbitmq android-jetpack-compose android-asynctask microsoft-graph-api tabs laravel-4 insert uicollectionview amazon-dynamodb environment-variables linker console xsd coldfusion upload continuous-integration ftp textview opengl-es operating-system vuejs3 mockito localization xml-parsing macros formatting 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 jquery-plugins db2 jenkins-pipeline leaflet event-handling postman flutter-layout annotations julia keyboard textbox arm visual-studio-2017 gulp libgdx stripe-payments xampp synchronization crystal-reports timezone azure-web-app-service dom-events uikit android-emulator swagger wso2 sequelize.js namespaces aggregation-framework uiscrollview jvm google-sheets-formula chart.js com subprocess geolocation webdriver centos html5-canvas snowflake-cloud-data-platform widget dialog garbage-collection numbers concatenation sql-update qml set windows-10 tuples mapreduce smtp ionic2 java-stream rotation modal-dialog spring-data android-edittext http-headers doctrine nuget radio-button grid sonarqube lucene xmlhttprequest internationalization listbox components initialization switch-statement google-play apache-camel boolean serial-port ldap ios5 youtube-api return gdb latex pivot eclipse-plugin tags frameworks containers github-actions dataset asp-classic subquery foreign-keys label copy uinavigationcontroller c++17 delegates google-cloud-storage migration struts2 base64 protractor find sql-server-2008-r2 queue embedded uibutton arguments composer-php append jaxb stack zip cucumber autolayout ide entity-framework-6 popup iteration airflow windows-7 r-markdown tailwind-css 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 (/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 Get early access and see previews of new features. (https://stackoverflow.co/labs/) Learn more about Labs (Illustration of upvote icon after it is clicked) Hang on, you can't upvote just yet. You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. (https://stackoverflow.com/help/whats-reputation) What's reputation and how do I get it? Instead, you can save this post to reference later. Save this post for later Not now (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (/questions/53143849/docker-compose-error-read-only-file-system) docker-compose error "read-only file system" (/questions/ask) Ask Question (2018-11-04 18:08:37Z) Asked 6 years, 4 months ago Modified (?lastactivity) (2023-05-26 21:29:20Z) 1 year, 9 months ago (Viewed 29,797 times) Viewed 30k times This question shows research effort; it is useful and clear (70:3:31e,16:1ee3752a72c29a82,10:1742521647,16:ad00f9e0f7010275,8:53143849,4f4470686c37eed57ffed4432472b0abe1f10976c0327d193e58519b64dc9846) 13 (This question does not show any research effort; it is unclear or not useful) (70:3:31e,16:7878a2388de241b2,10:1742521647,16:506b815a609471ea,8:53143849,e97f1b72cd6853402eba4c311f1ba058352b401eb9847f9ad421d9ea537d6480) Save this question. (/posts/53143849/timeline) Show activity on this post. I designed a docker-compose.yml file that also supposed to work with individual volumes. I created a raid-drive which is mounted as /dataraid to my system. I can read/write to the system, but when using it in my compose file, I get read-only file system error messages. Adjusting the volumes to a other path like /home/myname/test the compose file works. I have no idea what the /dataraid makes it "read-only". What are the permissions settings a compose file needs? error message: ERROR: for db Cannot start service db: error while creating mount source path '/dataraid/nextcloud/mariadb' : mkdir /dataraid: read-only file system compose: version: '3' services: db: image: mariadb command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW restart: always volumes: - /dataraid/nextcloud/mariadb:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=PASSWORD env_file: - db.env redis: image: redis restart: always app: image: nextcloud:fpm restart: always volumes: - /dataraid/nextcloud/html:/var/www/html environment: - MYSQL_HOST=db env_file: - db.env depends_on: - db - redis web: build: ./web restart: always volumes: - /dataraid/nextcloud/html:/var/www/html:ro environment: - VIRTUAL_HOST=name.de - LETSENCRYPT_HOST=name.de - LETSENCRYPT_EMAIL=x@y.de depends_on: - app ports: - 4080 :80 networks: - proxy-tier - default collabora: image: collabora/code expose: - 9980 cap_add: - MKNOD environment: - domain=name.de - VIRTUAL_HOST=name.de - VIRTUAL_PORT=9980 - VIRTUAL_PROTO=https - LETSENCRYPT_HOST=name.de - LETSENCRYPT_EMAIL=x@y.de - username= #optional - password= #optional networks: - proxy-tier restart: always cron: build: ./app restart: always volumes: - /dataraid/nextcloud/html:/var/www/html entrypoint: /cron.sh depends_on: - db - redis proxy: build: ./proxy restart: always ports: - 443 :443 - 80 :80 environment: - VIRTUAL_PROTO=https - VIRTUAL_PORT=443 labels: com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" volumes: - /dataraid/nextcloud/nginx-certs:/etc/nginx/certs:ro - /dataraid/nextcloud/nginx-vhost.d:/etc/nginx/vhost.d - /dataraid/nextcloud/nginx-html:/usr/share/nginx/html - /dataraid/nextcloud/nginx-conf.d:/etc/nginx/conf.d - /var/run/docker.sock:/tmp/docker.sock:ro networks: - proxy-tier letsencrypt-companion: image: jrcs/letsencrypt-nginx-proxy-companion restart: always volumes: - /dataraid/nextcloud/nginx-certs:/etc/nginx/certs - /dataraid/nextcloud/nginx-vhost.d:/etc/nginx/vhost.d - /dataraid/nextcloud/nginx-html:/usr/share/nginx/html - /var/run/docker.sock:/var/run/docker.sock:ro networks: - proxy-tier depends_on: - proxy networks: proxy-tier: see error messages: bernd@sys-dock:/dataraid/Docker-Configs/nextcloud$ docker-compose up -d Creating network "nextcloud_default" with the default driver Creating network "nextcloud_proxy-tier" with the default driver Creating nextcloud_db_1 ... Creating nextcloud_proxy_1 ... error Creating nextcloud_db_1 ... error Creating nextcloud_collabora_1 ... ERROR: for nextcloud_proxy_1 Cannot start service proxy: error while creating mount source path '/dataraid/nextcloud/nginx-certs' : mkdir /dataraid: read-only file system Creating nextcloud_redis_1 ... done Creating nextcloud_collabora_1 ... done ERROR: for proxy Cannot start service proxy: error while creating mount source path '/dataraid/nextcloud/nginx-certs' : mkdir /dataraid: read-only file system ERROR: for db Cannot start service db: error while creating mount source path '/dataraid/nextcloud/mariadb' : mkdir /dataraid: read-only file system ERROR: Encountered errors while bringing up the project. (/questions/tagged/docker) (show questions tagged 'docker') docker (/questions/tagged/docker-compose) (show questions tagged 'docker-compose') docker-compose (/q/53143849) (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 Follow (70:3:31e,16:d8366cbb7f7653f8,10:1742521647,16:111ff02452558fab,8:53143849,3ab26f51355114c8b907ea2f8439fe2fb6a9c41c3e4540c06d576f74a6e2054a) Follow this question to receive notifications (/posts/53143849/revisions) (show all edits to this post) edited (2022-06-23 02:30:27Z) Jun 23, 2022 at 2:30 (/users/6243352/ggorlen) (ggorlen's user avatar) (/users/6243352/ggorlen) ggorlen (reputation score 57,527) 57.5k (8 gold badges) 8 8 gold badges (112 silver badges) 112 112 silver badges (155 bronze badges) 155 155 bronze badges asked (2018-11-04 18:08:37Z) Nov 4, 2018 at 18:08 (/users/10604510/speedamaster) (speedAmaster's user avatar) (/users/10604510/speedamaster) speedAmaster speedAmaster (reputation score) 131 (1 gold badge) 1 1 gold badge (1 silver badge) 1 1 silver badge (4 bronze badges) 4 4 bronze badges 9 Can you post your docker-compose.yml file? – (/users/2340657/searsaw) (3,632 reputation) searsaw Commented (2018-11-04 18:33:44Z, License: CC BY-SA 4.0) Nov 4, 2018 at 18:33 Doesn't sound like anything to do with docker, more to do with how that drive is configured / mounted. Can you create regular files on the mount (without using Docker)? – (/users/559504/johnharris85) (19,016 reputation) johnharris85 Commented (2018-11-04 18:35:45Z, License: CC BY-SA 4.0) Nov 4, 2018 at 18:35 see my docker-compose.yml – (/users/10604510/speedamaster) (131 reputation) speedAmaster Commented (2018-11-04 19:38:20Z, License: CC BY-SA 4.0) Nov 4, 2018 at 19:38 (this comment was edited 1 time) @johnharris85: that is the strange part. I can touch and modify files in that mounted drive... – (/users/10604510/speedamaster) (131 reputation) speedAmaster Commented (2018-11-04 19:48:41Z, License: CC BY-SA 4.0) Nov 4, 2018 at 19:48 (number of 'useful comment' votes received) 5 Did you mount the dataraid filesystem after docker started? If so, try restarting the docker daemon (systemctl restart docker ) – (/users/596285/bmitch) (265,520 reputation) BMitch Commented (2018-11-05 23:39:37Z, License: CC BY-SA 4.0) Nov 5, 2018 at 23:39 (Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.) | (Expand to show all comments on this post) Show 4 more comments 2 Answers 2 Sorted by: (/questions/53143849/docker-compose-error-read-only-file-system?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:d32e3d9599131492,10:1742521647,16:e387522f3a4afcbd,8:60815796,78432f72fe91e11b0b848b8430d9cf9256d65af8e628d9f273aff2fdaf9a85dc) 22 (This answer is not useful) (70:3:31e,16:c9717f2f58752802,10:1742521647,16:e6c15f61b0d11628,8:60815796,24cf17fcb0184e3530ecf584a0b305afb6d93568a877d347467ebf7c90037b78) Save this answer. (Loading when this answer was accepted…) (/posts/60815796/timeline) Show activity on this post. If docker starts before the filesystem gets mounted, you could be seeing issues with the docker engine trying to write to the parent filesystem. You can restart the docker daemon to rule this out (systemctl restart docker in systemd base environments). If restarting the daemon helps, then you can add a dependency between the docker engine and the external filesystem mounts. In systemd, that involves an After= clause in the unit file. E.g. you could create a /etc/systemd/system/docker.service.d/override.conf file containing: [Unit ] After=nfs-client.target (Note that I'm not sure that nfs-client.target is the correct unit file for your filesystem, you'll want to check where it gets mounted.) Another issue I've seen people encounter recently is Snap based docker installs, which run docker inside of another container technology, which would prevent access to paths not explicitly configured in the Snap. (/a/60815796) (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 Follow (70:3:31e,16:22b9543f0e37f0d6,10:1742521647,16:719652ac3e71b1b1,8:60815796,aa7008d1a1aa1ed7400554fc189db6cafc7300cf8e6889e7cbf4ed5ebb6a1d4b) Follow this answer to receive notifications answered (2020-03-23 14:43:34Z) Mar 23, 2020 at 14:43 (/users/596285/bmitch) (BMitch's user avatar) (/users/596285/bmitch) BMitch BMitch (reputation score 265,520) 266k (50 gold badges) 50 50 gold badges (542 silver badges) 542 542 silver badges (500 bronze badges) 500 500 bronze badges 2 (number of 'useful comment' votes received) 1 That was exactly my issue, had used snap. – (/users/1779348/jesper-kristiansen) (1,979 reputation) Jesper Kristiansen Commented (2022-10-18 20:32:29Z, License: CC BY-SA 4.0) Oct 18, 2022 at 20:32 The problem was resolved just after re-installing the docker. In my case, the shared storage had been mounted after docker installation. – (/users/6119932/arashmad) (128 reputation) ArashMad Commented (2023-03-23 16:33:13Z, License: CC BY-SA 4.0) Mar 23, 2023 at 16:33 (this comment was edited 1 time) (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:4e71487e946a2aca,10:1742521647,16:388998bb1fc6b50e,8:76344274,87eaf45b247954ece15d121a3e5d2ddfb783357d5a72a48c97caab9f90873278) 0 (This answer is not useful) (70:3:31e,16:b7b4f78b3e120b33,10:1742521647,16:674a6887105a0a02,8:76344274,4271ceb975a2f075e09c4b0849382a45a3beb3d919be6b26e6b2882f485de050) Save this answer. (Loading when this answer was accepted…) (/posts/76344274/timeline) Show activity on this post. For me, changing :ro to :rw in my docker-compose.yml was the key to enabling write permissions. In your case (for example--I'm not sure this is your issue): web: build: ./web restart: always volumes: - /dataraid/nextcloud/html:/var/www/html:ro # change to :rw With :ro on my case, I saw: $ docker exec --privileged -it x_api bash root@api# touch foo touch: cannot touch 'foo': Read-only file system But after using :rw and restarting the container, touch worked. (/a/76344274) (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 Follow (70:3:31e,16:21c281545fa578f9,10:1742521647,16:b996864c2a3ffda4,8:76344274,f7bc2bf03e44bcd5985ebd04a3e1f5ca2787771085d4772da69bed9189c6d493) Follow this answer to receive notifications answered (2023-05-26 21:29:20Z) May 26, 2023 at 21:29 (/users/6243352/ggorlen) (ggorlen's user avatar) (/users/6243352/ggorlen) ggorlen ggorlen (reputation score 57,527) 57.5k (8 gold badges) 8 8 gold badges (112 silver badges) 112 112 silver badges (155 bronze badges) 155 155 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) (53143849) (false) () 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 (9b9d1ff1208457cf29de4d03e17fc06b55f301e0c5c48e7398c73e63b318268a) Sign up or (/users/login?ssrc=question_page&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f53143849%2fdocker-compose-error-read-only-file-system%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/docker-compose) (show questions tagged 'docker-compose') docker-compose See similar questions with these tags. The Overflow Blog (https://stackoverflow.blog/2025/03/18/improving-error-monitoring-with-ai/?cb=1) Improving error monitoring with AI (https://stackoverflow.blog/2025/03/19/wbit-5-building-a-framework-to-lure-web-devs-to-mobile/?cb=1) WBIT #5: Building a framework to lure web devs to mobile Featured on Meta (Meta Stack Exchange) (https://meta.stackexchange.com/questions/407321/community-asks-sprint-announcement-march-2025?cb=1) Community Asks Sprint Announcement - March 2025 (Meta Stack Exchange) (https://meta.stackexchange.com/questions/407547/experimenting-with-a-new-experiment-opt-out-option?cb=1) Experimenting with a new experiment opt-out option (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/432989/is-it-better-to-redirect-users-who-attempt-to-perform-actions-they-cant-yet-tak?cb=1) (Is it better to redirect users who attempt to perform actions they can't yet take?) Is it better to redirect users who attempt to perform actions they can't yet... (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/433034/stacks-editor-development-and-testing?cb=1) Stacks Editor development and testing Linked (https://stackoverflow.com/q/52526219?lq=1) (Question score (upvotes - downvotes)) 81 (https://stackoverflow.com/questions/52526219/docker-mkdir-read-only-file-system?noredirect=1&lq=1) Docker - mkdir read-only file system Related (https://stackoverflow.com/q/34031397?rq=3) (Question score (upvotes - downvotes)) 40 (https://stackoverflow.com/questions/34031397/running-docker-on-ubuntu-mounted-host-volume-is-not-writable-from-container?rq=3) Running docker on Ubuntu: mounted host volume is not writable from container (https://stackoverflow.com/q/49916803?rq=3) (Question score (upvotes - downvotes)) 11 (https://stackoverflow.com/questions/49916803/docker-compose-make-shared-volume-writable-permission-denied?rq=3) Docker Compose Make Shared Volume Writable Permission Denied (https://stackoverflow.com/q/54049196?rq=3) (Question score (upvotes - downvotes)) 7 (https://stackoverflow.com/questions/54049196/getting-read-only-filesystem-error-inside-a-docker-container?rq=3) Getting Read Only Filesystem Error inside a docker container (https://stackoverflow.com/q/57217326?rq=3) (Question score (upvotes - downvotes)) 2 (https://stackoverflow.com/questions/57217326/docker-compose-mounted-volume-not-writable?rq=3) Docker (compose) mounted volume not writable (https://stackoverflow.com/q/58366696?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/58366696/mount-files-in-read-only-volume-where-source-is-in-dockerignore?rq=3) Mount files in read-only volume (where source is in .dockerignore) (https://stackoverflow.com/q/58694995?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/58694995/docker-permission-denied-when-writing-files-inside-container?rq=3) Docker permission denied when writing files inside container (https://stackoverflow.com/q/64473536?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/64473536/why-is-this-volume-mounted-as-read-only?rq=3) Why is this volume mounted as read only? (https://stackoverflow.com/q/67302632?rq=3) (Question score (upvotes - downvotes)) 3 (https://stackoverflow.com/questions/67302632/read-only-filesystem-error-with-docker-compose-volume-mounts?rq=3) Read only filesystem error with docker-compose volume mounts (https://stackoverflow.com/q/68218291?rq=3) (Question score (upvotes - downvotes)) 32 (https://stackoverflow.com/questions/68218291/docker-error-with-read-only-file-system-unknown?rq=3) Docker error with read-only file system unknown (https://stackoverflow.com/q/68508671?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/68508671/docker-compose-pull-error-error-creating-temporary-lease-read-only-file-syste?rq=3) docker-compose pull Error: "error creating temporary lease: read-only file system" (https://stackexchange.com/questions?tab=hot) Hot Network Questions (Linguistics Stack Exchange) (https://linguistics.stackexchange.com/questions/49866/is-it-a-coincidence-that-6-letters-in-armenian-alphabet-completely-look-like-let) Is it a coincidence that 6 letters in Armenian alphabet completely look like letters in Latin alphabets? (Politics Stack Exchange) (https://politics.stackexchange.com/questions/91077/how-is-friedrich-merz-able-to-borrow-%e2%82%ac500-billion-when-liz-truss-couldnt-borrow) How is Friedrich Merz able to borrow €500 billion when Liz Truss couldn't borrow £120 billion? (Geographic Information Systems Stack Exchange) (https://gis.stackexchange.com/questions/491274/define-the-opacity-of-the-fill-color-in-symbology) Define the opacity of the "Fill color" in Symbology (Movies & TV Stack Exchange) (https://movies.stackexchange.com/questions/124880/sci-fi-movie-that-predates-the-matrix-but-shares-themes) Sci-fi movie that predates The Matrix but shares themes (Artificial Intelligence Stack Exchange) (https://ai.stackexchange.com/questions/48257/could-ai-be-picasso-if-he-had-never-existed) Could AI be Picasso if he had never existed? (German Language Stack Exchange) (https://german.stackexchange.com/questions/78946/specific-adjective-ending-question) Specific adjective ending question (Personal Finance & Money Stack Exchange) (https://money.stackexchange.com/questions/165577/why-is-there-initial-margin-when-i-did-not-borrow-any-money-to-begin-with) Why is there initial margin when i did not borrow any money to begin with? (Cryptography Stack Exchange) (https://crypto.stackexchange.com/questions/114611/is-there-still-an-active-cryptographic-standard-in-some-developing-country-that) Is there still an active cryptographic standard in some developing country that allows the DLP in the multiplicative group of finite fields? (Chemistry Stack Exchange) (https://chemistry.stackexchange.com/questions/188022/what-is-the-least-viscous-liquid-that-isnt-a-superfluid) What is the least-viscous liquid that isn't a superfluid? (Mathematics Stack Exchange) (https://math.stackexchange.com/questions/5047774/succession-of-tangent-circles) Succession of tangent circles (Travel Stack Exchange) (https://travel.stackexchange.com/questions/193837/can-i-re-enter-the-usa-with-an-esta-if-my-immigrant-status-is-l2) Can I re-enter the USA with an ESTA, if my immigrant status is L2? (MathOverflow) (https://mathoverflow.net/questions/489767/numerical-methods-for-nearest-cyclotomic-integer) Numerical methods for nearest cyclotomic integer (Academia Stack Exchange) (https://academia.stackexchange.com/questions/217411/the-time-management-of-teaching-v-research) The time management of teaching v research (Geographic Information Systems Stack Exchange) (https://gis.stackexchange.com/questions/491272/change-standard-font-in-qgis-layout) Change standard font in QGIS layout (Mathematics Stack Exchange) (https://math.stackexchange.com/questions/5047756/is-it-possible-for-a-diffeomorphism-on-a-connected-smooth-manifold-to-fix-a-none) Is it possible for a diffeomorphism on a connected smooth manifold to fix a nonempty open set and not be the identity? (Politics Stack Exchange) (https://politics.stackexchange.com/questions/91068/how-can-the-greens-ensure-that-100-billion-euros-go-to-climate-transformation-fu) How can the Greens ensure that 100 billion Euros go to climate transformation fund? (Physics Stack Exchange) (https://physics.stackexchange.com/questions/845737/standard-deviation-on-particle-detector-efficency) Standard deviation on particle detector efficency (Japanese Language Stack Exchange) (https://japanese.stackexchange.com/questions/107324/how-is-a-poem-like-a-neck) How is a poem like a neck? (Science Fiction & Fantasy Stack Exchange) (https://scifi.stackexchange.com/questions/295558/what-does-uhura-mean-by-the-mouth-breather-hiding-under-your-bed) What does Uhura mean by "the mouth-breather hiding under your bed"? (Mathematica Stack Exchange) (https://mathematica.stackexchange.com/questions/311676/using-listplot-on-a-ragged-list) Using Listplot on a ragged list (Bicycles Stack Exchange) (https://bicycles.stackexchange.com/questions/96394/can-anyone-identify-what-make-and-model-this-bike-is-all-i-have-is-a-picture-i-h) Can anyone identify what make and model this bike is all i have is a picture i have no idea just that its a fold up bicycle (Puzzling Stack Exchange) (https://puzzling.stackexchange.com/questions/131032/two-counterfeit-coins-and-a-balance) Two Counterfeit Coins and a Balance (Physics Stack Exchange) (https://physics.stackexchange.com/questions/845734/why-do-atomic-clocks-measure-different-elapsed-times-at-different-gravitational) Why do atomic clocks measure different elapsed times at different gravitational field strengths if their internal rate is stable quantum transitions (Science Fiction & Fantasy Stack Exchange) (https://scifi.stackexchange.com/questions/295549/what-is-the-benefit-of-vocalizing-when-casting-a-spell-rather-than-doing-it-sile) What is the benefit of vocalizing when casting a spell rather than doing it silently? (/feeds/question/53143849) (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/53143849) () lang-yaml (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.3.20.24206