spring-projects / spring-projects/spring-boot

Support SSH protocol for communication with Docker daemon for image building

Open
#24,270 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

Issue
bootBuildImage does not seem to support ssh protocol in DOCKER_HOST

How to reproduce this issue?
Run
DOCKER_HOST="ssh://pi@192.168.1.1" ./gradlew bootBuildImage

What is expected outcome?
Buildpacks build image into the remote machine

What is the current outcome?

➜  DOCKER_HOST="ssh://pi@192.168.1.1" ./gradlew bootBuildImage    

> Task :webservice:bootBuildImage FAILED
Building image 'docker.io/library/webservice:0.0.1-SNAPSHOT'

 > Pulling builder image 'docker.io/paketobuildpacks/builder:base' ..................................................

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':webservice:bootBuildImage'.
> Connection to the Docker daemon at 'pi@192.168.1.1' failed with error "pi@192.168.1.1: Name or service not known"; ensure the Docker daemon is running and accessible

More information
Remote daemon works just fine

✗ DOCKER_HOST="ssh://pi@192.168.1.1" docker info 
Client:
 Debug Mode: false

Server:
 Containers: 8
  Running: 4
  Paused: 0
  Stopped: 4
 Images: 44
 Server Version: 19.03.13
 Storage Driver: overlay2
....

Spring Boot: 2.4.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the bootBuildImage Gradle task and its handling of DOCKER_HOST, using the reproduced ssh://pi@192.168.1.1 command as the entry point. Compare its Docker daemon connection behavior with docker info; done means the task can build the image on the remote daemon over SSH without the name-resolution failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, spring-boot
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.