{"id":96975,"date":"2020-04-30T14:32:41","date_gmt":"2020-04-30T06:32:41","guid":{"rendered":"http:\/\/4563.org\/?p=96975"},"modified":"2020-04-30T14:32:41","modified_gmt":"2020-04-30T06:32:41","slug":"cant-chdir-to-usr-local-redis-data-no-such-file-or-directory-%e6%80%8e%e4%b9%88%e5%a4%84%e7%90%86%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=96975","title":{"rendered":"Can&#8217;t chdir to &#8216;\/usr\/local\/redis\/data&#8217;: No such file or directory \u600e\u4e48\u5904\u7406\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Can&#8217;t chdir to &#8216;\/usr\/local\/redis\/data&#8217;: No such file or directory \u600e\u4e48\u5904\u7406\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mifar <\/span>  <span><i><\/i> 76<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<pre><code>  redis:     image: redis:${REDIS_VERSION}     container_name: redis     ports:       - \"6379:6379\"     volumes:       - .\/file\/redis.conf:\/etc\/redis.conf       - .\/data\/redis\/:\/data       - .\/logs\/redis.log:\/usr\/local\/redis\/redis.log     restart: always     entrypoint: [\"redis-server\", \"\/etc\/redis.conf\"] <\/code><\/pre>\n<p>\u542f\u52a8\u540e \u65e5\u5fd7 \u62a5\u9519\uff1a<\/p>\n<pre><code>Can't chdir to '\/usr\/local\/redis\/data': No such file or directory <\/code><\/pre>\n<p>\u770b\u4e86\u5f88\u591a dockercompose \u6587\u4ef6\uff0c\u90fd\u8ba9\u6302\u5728 \/data \u548c \/usr\/local\/redis\/data \u5176\u5b9e\u662f\u4e00\u6837\u7684\uff0c\u548b\u6574\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"902628\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : neoblackcap <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u80fd\u6302\u8f7d\u7684\u53ea\u6709\u76ee\u5f55\uff0c\u6587\u4ef6\u662f\u4e0d\u80fd\u6302\u8f7d\u7684\uff0c\u6302\u8f7d\u7236\u76ee\u5f55\u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"902629\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shellcmd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u624b\u52a8\u65b0\u5efa\u4e00\u4e0b\u5462\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"902630\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Mitt <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             entrypoint \u90a3\u884c\u6ce8\u91ca\u6389                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"902631\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : codehz <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @neoblackcap \u8c01\u8bf4\u7684\u53ea\u80fd\u76ee\u5f55\u6302\u8f7d\u7684\u3002\u3002\u3002\u4e0d\u662f\u4e00\u76f4\u90fd\u7528\u7740\u6587\u4ef6\u4e48<\/p>\n<p>\u8fd9\u91cc\u7684\u95ee\u9898\u5f88\u53ef\u80fd\u662f\u70b9\u9020\u6210\u7684\uff0c\u53ef\u4ee5\u8bd5\u8bd5\u7528${PWD}\u4ee3\u66ff\u70b9\u3002\u3002\uff08\u6216\u8005\u5e72\u8106\u7528\u7edd\u5bf9\u8def\u5f84                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"902632\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : neoblackcap <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @codehz \u4f60\u8bf4\u7684\u5bf9\uff0c\u7ecf\u8fc7\u8bd5\u9a8c\u662f\u6211\u9519\u4e86\uff0c\u5e94\u8be5\u7528\u7edd\u5bf9\u8def\u5f84\u5c31\u597d\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Can&#8217;t chdir&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/96975"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=96975"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/96975\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=96975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=96975"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=96975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}