Gitlab-runner + Docker + Windows - Invalid volume specification
I'm trying to run my Gitlab CI locally using Gitlab-runner and docker before committing to make sure they work okay. But I'm having some strange issues!
Unfortunately I have no choice but to use windows (I've had success in the past on Linux).
Every time I run a job in powershell:
C:/Gitlab-runner/gitlab-runner exec docker npm
I get an error:
Job failed (system failure): Error response from daemon: invalid volume specification: '/host_mnt/c/builds/project-0/Users/Lewsmith/api:C:/Users/Lewsmith/api:ro' (executor_docker.go:921:0s)
I've tried setting docker volumes (nemerous combinations) and builds-dir:
C:/Gitlab-runner/gitlab-runner exec docker --builds-dir /builds --docker-privileged --docker-volumes "/builds:C:/Gitlab-runner/builds" npm
That fails with Error response from daemon: invalid mode: /Gitlab-runner/builds
because of the colon after the C..
Can anyone point me in the right direction as I'm stumped?
Using gitlab-runner version 11.5.0
docker gitlab gitlab-ci gitlab-ci-runner
add a comment |
I'm trying to run my Gitlab CI locally using Gitlab-runner and docker before committing to make sure they work okay. But I'm having some strange issues!
Unfortunately I have no choice but to use windows (I've had success in the past on Linux).
Every time I run a job in powershell:
C:/Gitlab-runner/gitlab-runner exec docker npm
I get an error:
Job failed (system failure): Error response from daemon: invalid volume specification: '/host_mnt/c/builds/project-0/Users/Lewsmith/api:C:/Users/Lewsmith/api:ro' (executor_docker.go:921:0s)
I've tried setting docker volumes (nemerous combinations) and builds-dir:
C:/Gitlab-runner/gitlab-runner exec docker --builds-dir /builds --docker-privileged --docker-volumes "/builds:C:/Gitlab-runner/builds" npm
That fails with Error response from daemon: invalid mode: /Gitlab-runner/builds
because of the colon after the C..
Can anyone point me in the right direction as I'm stumped?
Using gitlab-runner version 11.5.0
docker gitlab gitlab-ci gitlab-ci-runner
Are you using the gitlab-runner shell executor?
– Rekovni
Nov 26 '18 at 13:26
@Rekovni I'm using the docker executor. Shell executor works okay for jobs that run npm install and linter, but I have a test job that requires a postgres service. Services don't work with shell executors.
– Lewsmith
Nov 26 '18 at 13:42
add a comment |
I'm trying to run my Gitlab CI locally using Gitlab-runner and docker before committing to make sure they work okay. But I'm having some strange issues!
Unfortunately I have no choice but to use windows (I've had success in the past on Linux).
Every time I run a job in powershell:
C:/Gitlab-runner/gitlab-runner exec docker npm
I get an error:
Job failed (system failure): Error response from daemon: invalid volume specification: '/host_mnt/c/builds/project-0/Users/Lewsmith/api:C:/Users/Lewsmith/api:ro' (executor_docker.go:921:0s)
I've tried setting docker volumes (nemerous combinations) and builds-dir:
C:/Gitlab-runner/gitlab-runner exec docker --builds-dir /builds --docker-privileged --docker-volumes "/builds:C:/Gitlab-runner/builds" npm
That fails with Error response from daemon: invalid mode: /Gitlab-runner/builds
because of the colon after the C..
Can anyone point me in the right direction as I'm stumped?
Using gitlab-runner version 11.5.0
docker gitlab gitlab-ci gitlab-ci-runner
I'm trying to run my Gitlab CI locally using Gitlab-runner and docker before committing to make sure they work okay. But I'm having some strange issues!
Unfortunately I have no choice but to use windows (I've had success in the past on Linux).
Every time I run a job in powershell:
C:/Gitlab-runner/gitlab-runner exec docker npm
I get an error:
Job failed (system failure): Error response from daemon: invalid volume specification: '/host_mnt/c/builds/project-0/Users/Lewsmith/api:C:/Users/Lewsmith/api:ro' (executor_docker.go:921:0s)
I've tried setting docker volumes (nemerous combinations) and builds-dir:
C:/Gitlab-runner/gitlab-runner exec docker --builds-dir /builds --docker-privileged --docker-volumes "/builds:C:/Gitlab-runner/builds" npm
That fails with Error response from daemon: invalid mode: /Gitlab-runner/builds
because of the colon after the C..
Can anyone point me in the right direction as I'm stumped?
Using gitlab-runner version 11.5.0
docker gitlab gitlab-ci gitlab-ci-runner
docker gitlab gitlab-ci gitlab-ci-runner
asked Nov 25 '18 at 22:06
LewsmithLewsmith
959
959
Are you using the gitlab-runner shell executor?
– Rekovni
Nov 26 '18 at 13:26
@Rekovni I'm using the docker executor. Shell executor works okay for jobs that run npm install and linter, but I have a test job that requires a postgres service. Services don't work with shell executors.
– Lewsmith
Nov 26 '18 at 13:42
add a comment |
Are you using the gitlab-runner shell executor?
– Rekovni
Nov 26 '18 at 13:26
@Rekovni I'm using the docker executor. Shell executor works okay for jobs that run npm install and linter, but I have a test job that requires a postgres service. Services don't work with shell executors.
– Lewsmith
Nov 26 '18 at 13:42
Are you using the gitlab-runner shell executor?
– Rekovni
Nov 26 '18 at 13:26
Are you using the gitlab-runner shell executor?
– Rekovni
Nov 26 '18 at 13:26
@Rekovni I'm using the docker executor. Shell executor works okay for jobs that run npm install and linter, but I have a test job that requires a postgres service. Services don't work with shell executors.
– Lewsmith
Nov 26 '18 at 13:42
@Rekovni I'm using the docker executor. Shell executor works okay for jobs that run npm install and linter, but I have a test job that requires a postgres service. Services don't work with shell executors.
– Lewsmith
Nov 26 '18 at 13:42
add a comment |
1 Answer
1
active
oldest
votes
At the moment there isn't official support for the Docker executor in Windows. A work in progress issue is open at the moment, and it looks like some people have managed to get a windows docker executor working to varying success in that merge request.
This specific comment shows how they've managed to get it setup using a custom built gitlab-runner. I'm unsure how this will work with Services however, so YMMV.
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%2f53472481%2fgitlab-runner-docker-windows-invalid-volume-specification%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
At the moment there isn't official support for the Docker executor in Windows. A work in progress issue is open at the moment, and it looks like some people have managed to get a windows docker executor working to varying success in that merge request.
This specific comment shows how they've managed to get it setup using a custom built gitlab-runner. I'm unsure how this will work with Services however, so YMMV.
add a comment |
At the moment there isn't official support for the Docker executor in Windows. A work in progress issue is open at the moment, and it looks like some people have managed to get a windows docker executor working to varying success in that merge request.
This specific comment shows how they've managed to get it setup using a custom built gitlab-runner. I'm unsure how this will work with Services however, so YMMV.
add a comment |
At the moment there isn't official support for the Docker executor in Windows. A work in progress issue is open at the moment, and it looks like some people have managed to get a windows docker executor working to varying success in that merge request.
This specific comment shows how they've managed to get it setup using a custom built gitlab-runner. I'm unsure how this will work with Services however, so YMMV.
At the moment there isn't official support for the Docker executor in Windows. A work in progress issue is open at the moment, and it looks like some people have managed to get a windows docker executor working to varying success in that merge request.
This specific comment shows how they've managed to get it setup using a custom built gitlab-runner. I'm unsure how this will work with Services however, so YMMV.
answered Nov 26 '18 at 13:58
RekovniRekovni
1,1641430
1,1641430
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.
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%2f53472481%2fgitlab-runner-docker-windows-invalid-volume-specification%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
Are you using the gitlab-runner shell executor?
– Rekovni
Nov 26 '18 at 13:26
@Rekovni I'm using the docker executor. Shell executor works okay for jobs that run npm install and linter, but I have a test job that requires a postgres service. Services don't work with shell executors.
– Lewsmith
Nov 26 '18 at 13:42