Docker On Mac - OCI runtime create failed: mkdir permission denied
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
add a comment |
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
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 '18 at 13:20
@DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
– hemanik
Nov 26 '18 at 3:55
add a comment |
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
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
macos docker
edited Nov 23 '18 at 5:40
asked Nov 23 '18 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 '18 at 13:20
@DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
– hemanik
Nov 26 '18 at 3:55
add a comment |
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 '18 at 13:20
@DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
– hemanik
Nov 26 '18 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 '18 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 '18 at 13:20
@DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
– hemanik
Nov 26 '18 at 3:55
@DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
– hemanik
Nov 26 '18 at 3:55
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 26 '18 at 6:01
hemanik
155313
155313
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 '18 at 13:20
@DavidMaze, Here's the complete file - github.com/vmware/purser/blob/master/.make/…
– hemanik
Nov 26 '18 at 3:55