Skip to content
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 Docker to 19.03.8 #262

Merged
merged 3 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ func commandPush(build Build, tag string) *exec.Cmd {

// helper function to create the docker daemon command.
func commandDaemon(daemon Daemon) *exec.Cmd {
args := []string{"--data-root", daemon.StoragePath}
args := []string{
"--data-root", daemon.StoragePath,
"--host=unix:///var/run/docker.sock",
Copy link
Member

@bradrydzewski bradrydzewski Mar 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard-coding the unix socket would break the plugin for windows. Are we sure this change is necessary since DOCKER_HOST is being set globally as an image environment variable?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other solution would be to listen on TCP socket without TLS, like this tcp://0.0.0.0:2375.
Should I make the change ?

}

if daemon.StorageDriver != "" {
args = append(args, "-s", daemon.StorageDriver)
Expand Down
4 changes: 3 additions & 1 deletion docker/docker/Dockerfile.linux.amd64
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM docker:18.09.0-dind
FROM docker:19.03.8-dind

ENV DOCKER_HOST=unix:///var/run/docker.sock
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this is required? The command execution is not loading env variables, so I think this change can simply get reverted.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it won't work if you revert this, docker client will try to connect on default value of DOCKER_HOST tcp://docker:2375 otherwise

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is from the entrypoint calling dockerd-entrypoint.sh which calls docker-entrypoint.sh which sets DOCKER_HOST when unset. I don't think there's anything needed from those entrypoint scripts for drone so we could change the entrypoint to:

ENTRYPOINT ["/bin/drone-docker"]

and then remove the ENV DOCKER_HOST for the same result. There's also no need for --host when starting dockerd.


ADD release/linux/amd64/drone-docker /bin/
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-docker"]
4 changes: 3 additions & 1 deletion docker/docker/Dockerfile.linux.arm
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM arm32v6/docker:18.09.0-dind
FROM arm32v6/docker:19.03.8-dind

ENV DOCKER_HOST=unix:///var/run/docker.sock

ADD release/linux/arm/drone-docker /bin/
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-docker"]
4 changes: 3 additions & 1 deletion docker/docker/Dockerfile.linux.arm64
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM arm64v8/docker:18.09.0-dind
FROM arm64v8/docker:19.03.8-dind

ENV DOCKER_HOST=unix:///var/run/docker.sock

ADD release/linux/arm64/drone-docker /bin/
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-docker"]