Docker On Mac - OCI runtime create failed: mkdir permission denied












0














When trying to run my docker file. I get the following error.



docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/Users/hkatyal/go/src/github.com/purser/bin/amd64\" to rootfs \"/var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged\" at \"/var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged/go/bin/linux_amd64\" caused \"mkdir /var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged/go/bin/linux_amd64: permission denied\""": unknown.


My Docker Cmd is as follows:



@docker run                                                            
-ti
-u $$(id -u):$$(id -g)
-v $$(pwd)/.go:/go:$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(BUILD):/go/src/$(PRO)/$(BUILD):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(CMD):/go/src/$(PRO)/$(CMD):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(PKG):/go/src/$(PRO)/$(PKG):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(DEP):/go/src/$(PRO)/$(DEP):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/bin/$(ARCH):/go/bin:$(DOCKER_MOUNT_MODE)
-v $$(pwd)/bin/$(ARCH):/go/bin/linux_$(ARCH):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static:$(DOCKER_MOUNT_MODE)
-w /go/src
golang:1.11
/bin/sh -c "
ARCH=$(ARCH)
VERSION=$(VERSION)
PKG=$(PKG)
./$(PRO)/$(BUILD)/build.sh
"


This issue is coming in Mac working fine for Linux. Do I need to change some settings?



Environment Details as follows:



macOS Version: 10.13.6


Docker Version:



$  docker version
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:43 2018
OS/Arch: darwin/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: true









share|improve this question




















  • 1




    That looks like a Makefile fragment, not a Dockerfile. Can you include the complete Makefile, including any relevant environment variables, and trim it down to a Minimal, Complete, and Verifiable example? (Glancing at that I'd guess trying to have overlapping mounts in /go/bin is a problem, and that this setup would be much easier if it was written as a Dockerfile.)
    – David Maze
    Nov 23 at 13:20










  • @DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
    – hemanik
    Nov 26 at 3:55
















0














When trying to run my docker file. I get the following error.



docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/Users/hkatyal/go/src/github.com/purser/bin/amd64\" to rootfs \"/var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged\" at \"/var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged/go/bin/linux_amd64\" caused \"mkdir /var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged/go/bin/linux_amd64: permission denied\""": unknown.


My Docker Cmd is as follows:



@docker run                                                            
-ti
-u $$(id -u):$$(id -g)
-v $$(pwd)/.go:/go:$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(BUILD):/go/src/$(PRO)/$(BUILD):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(CMD):/go/src/$(PRO)/$(CMD):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(PKG):/go/src/$(PRO)/$(PKG):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(DEP):/go/src/$(PRO)/$(DEP):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/bin/$(ARCH):/go/bin:$(DOCKER_MOUNT_MODE)
-v $$(pwd)/bin/$(ARCH):/go/bin/linux_$(ARCH):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static:$(DOCKER_MOUNT_MODE)
-w /go/src
golang:1.11
/bin/sh -c "
ARCH=$(ARCH)
VERSION=$(VERSION)
PKG=$(PKG)
./$(PRO)/$(BUILD)/build.sh
"


This issue is coming in Mac working fine for Linux. Do I need to change some settings?



Environment Details as follows:



macOS Version: 10.13.6


Docker Version:



$  docker version
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:43 2018
OS/Arch: darwin/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: true









share|improve this question




















  • 1




    That looks like a Makefile fragment, not a Dockerfile. Can you include the complete Makefile, including any relevant environment variables, and trim it down to a Minimal, Complete, and Verifiable example? (Glancing at that I'd guess trying to have overlapping mounts in /go/bin is a problem, and that this setup would be much easier if it was written as a Dockerfile.)
    – David Maze
    Nov 23 at 13:20










  • @DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
    – hemanik
    Nov 26 at 3:55














0












0








0







When trying to run my docker file. I get the following error.



docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/Users/hkatyal/go/src/github.com/purser/bin/amd64\" to rootfs \"/var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged\" at \"/var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged/go/bin/linux_amd64\" caused \"mkdir /var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged/go/bin/linux_amd64: permission denied\""": unknown.


My Docker Cmd is as follows:



@docker run                                                            
-ti
-u $$(id -u):$$(id -g)
-v $$(pwd)/.go:/go:$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(BUILD):/go/src/$(PRO)/$(BUILD):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(CMD):/go/src/$(PRO)/$(CMD):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(PKG):/go/src/$(PRO)/$(PKG):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(DEP):/go/src/$(PRO)/$(DEP):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/bin/$(ARCH):/go/bin:$(DOCKER_MOUNT_MODE)
-v $$(pwd)/bin/$(ARCH):/go/bin/linux_$(ARCH):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static:$(DOCKER_MOUNT_MODE)
-w /go/src
golang:1.11
/bin/sh -c "
ARCH=$(ARCH)
VERSION=$(VERSION)
PKG=$(PKG)
./$(PRO)/$(BUILD)/build.sh
"


This issue is coming in Mac working fine for Linux. Do I need to change some settings?



Environment Details as follows:



macOS Version: 10.13.6


Docker Version:



$  docker version
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:43 2018
OS/Arch: darwin/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: true









share|improve this question















When trying to run my docker file. I get the following error.



docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/Users/hkatyal/go/src/github.com/purser/bin/amd64\" to rootfs \"/var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged\" at \"/var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged/go/bin/linux_amd64\" caused \"mkdir /var/lib/docker/overlay2/c144a9b95f53811b456c7a4e84064bf4231a2a94afcf2c77b8c6d031c3f4bf87/merged/go/bin/linux_amd64: permission denied\""": unknown.


My Docker Cmd is as follows:



@docker run                                                            
-ti
-u $$(id -u):$$(id -g)
-v $$(pwd)/.go:/go:$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(BUILD):/go/src/$(PRO)/$(BUILD):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(CMD):/go/src/$(PRO)/$(CMD):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(PKG):/go/src/$(PRO)/$(PKG):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/$(DEP):/go/src/$(PRO)/$(DEP):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/bin/$(ARCH):/go/bin:$(DOCKER_MOUNT_MODE)
-v $$(pwd)/bin/$(ARCH):/go/bin/linux_$(ARCH):$(DOCKER_MOUNT_MODE)
-v $$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static:$(DOCKER_MOUNT_MODE)
-w /go/src
golang:1.11
/bin/sh -c "
ARCH=$(ARCH)
VERSION=$(VERSION)
PKG=$(PKG)
./$(PRO)/$(BUILD)/build.sh
"


This issue is coming in Mac working fine for Linux. Do I need to change some settings?



Environment Details as follows:



macOS Version: 10.13.6


Docker Version:



$  docker version
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:43 2018
OS/Arch: darwin/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: true






macos docker






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 at 5:40

























asked Nov 23 at 4:43









hemanik

155313




155313








  • 1




    That looks like a Makefile fragment, not a Dockerfile. Can you include the complete Makefile, including any relevant environment variables, and trim it down to a Minimal, Complete, and Verifiable example? (Glancing at that I'd guess trying to have overlapping mounts in /go/bin is a problem, and that this setup would be much easier if it was written as a Dockerfile.)
    – David Maze
    Nov 23 at 13:20










  • @DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
    – hemanik
    Nov 26 at 3:55














  • 1




    That looks like a Makefile fragment, not a Dockerfile. Can you include the complete Makefile, including any relevant environment variables, and trim it down to a Minimal, Complete, and Verifiable example? (Glancing at that I'd guess trying to have overlapping mounts in /go/bin is a problem, and that this setup would be much easier if it was written as a Dockerfile.)
    – David Maze
    Nov 23 at 13:20










  • @DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
    – hemanik
    Nov 26 at 3:55








1




1




That looks like a Makefile fragment, not a Dockerfile. Can you include the complete Makefile, including any relevant environment variables, and trim it down to a Minimal, Complete, and Verifiable example? (Glancing at that I'd guess trying to have overlapping mounts in /go/bin is a problem, and that this setup would be much easier if it was written as a Dockerfile.)
– David Maze
Nov 23 at 13:20




That looks like a Makefile fragment, not a Dockerfile. Can you include the complete Makefile, including any relevant environment variables, and trim it down to a Minimal, Complete, and Verifiable example? (Glancing at that I'd guess trying to have overlapping mounts in /go/bin is a problem, and that this setup would be much easier if it was written as a Dockerfile.)
– David Maze
Nov 23 at 13:20












@DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
– hemanik
Nov 26 at 3:55




@DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
– hemanik
Nov 26 at 3:55












1 Answer
1






active

oldest

votes


















0














The problem is that the Mac machine isn't a real Docker host and Docker on Mac runs on the VM and the Docker volumes are not in the path.



Details here.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53440751%2fdocker-on-mac-oci-runtime-create-failed-mkdir-permission-denied%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The problem is that the Mac machine isn't a real Docker host and Docker on Mac runs on the VM and the Docker volumes are not in the path.



    Details here.






    share|improve this answer


























      0














      The problem is that the Mac machine isn't a real Docker host and Docker on Mac runs on the VM and the Docker volumes are not in the path.



      Details here.






      share|improve this answer
























        0












        0








        0






        The problem is that the Mac machine isn't a real Docker host and Docker on Mac runs on the VM and the Docker volumes are not in the path.



        Details here.






        share|improve this answer












        The problem is that the Mac machine isn't a real Docker host and Docker on Mac runs on the VM and the Docker volumes are not in the path.



        Details here.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 26 at 6:01









        hemanik

        155313




        155313






























            draft saved

            draft discarded




















































            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 tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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 tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53440751%2fdocker-on-mac-oci-runtime-create-failed-mkdir-permission-denied%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Contact image not getting when fetch all contact list from iPhone by CNContact

            count number of partitions of a set with n elements into k subsets

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks