-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dind setup for tests #8081
Conversation
e4bfa85
to
6fa0675
Compare
Jenkinsfile
Outdated
@@ -99,6 +99,8 @@ def runTests(dockerVersion, pythonVersion, baseImage) { | |||
--privileged \\ | |||
--volume="\$(pwd)/.git:/code/.git" \\ | |||
--volume="/var/run/docker.sock:/var/run/docker.sock" \\ | |||
--volume="\$(pwd)/.docker/config.json:/code/.docker/config.json" \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it needs to be in the home directory, so I assume it is /root/.docker/config.json
in the container. On the host probably in $HOME.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like script/test/all
uses ~/.docker/ ...
, which should also work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(for the "host" side that is 😅)
@@ -99,6 +99,8 @@ def runTests(dockerVersion, pythonVersion, baseImage) { | |||
--privileged \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually need --privileged
for this container? I see it bind-mounts docker.sock
, which means that all docker
commands will actually run against the docker daemon running on the host (not a dockerd
daemon running inside the container (which would require privileged)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually wondering if we need a container here at all, because it's running a container, just to run a script, that uses the docker
CLI inside the container to start new containers on the host 🤔
b701614
to
c5f70f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Wonder if it this works, I saw a dockerbuildbot/compose
image 😅
Maybe we should rerun CI?
Signed-off-by: aiordache <anca.iordache@docker.com>
c5f70f2
to
eaee62e
Compare
Also opened docker-library/docker#295 for discussion If I find some time, I may have a look at #8081 (comment) |
Update Jenkins files and scripts:
.docker/config
for authenticating pulls in dind containersdockerswarm/dind
withdocker:<version>-dind