-
Notifications
You must be signed in to change notification settings - Fork 294
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
pack buildpack inspect
now works when no docker daemon is available
#1104
Conversation
Signed-off-by: dwillist <dthornton@vmware.com>
a12b488
to
05750dc
Compare
Codecov Report
@@ Coverage Diff @@
## main #1104 +/- ##
==========================================
- Coverage 80.53% 80.00% -0.52%
==========================================
Files 136 136
Lines 8229 5994 -2235
==========================================
- Hits 6626 4795 -1831
+ Misses 1174 766 -408
- Partials 429 433 +4
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
✅ Accepted
- The json key
localError
looks inconsistent.- We normally use snake_case. See
pack inspect-image -o json
- We normally use snake_case. See
❯ pack inspect-image buildpacksio/pack:latest --bom
ERROR: unable to find image 'buildpacksio/pack:latest' locally or remotely
❯ pack-dev inspect-image buildpacksio/pack:latest --bom
{
"remote": [
{
"name": "go",
"metadata": {
"licenses": [],
"name": "Go",
"sha256": "2b6ff1d4025212d18db2c238cc6381b46c8da0e01de95705343ae529edb28e90",
"stacks": [
"io.buildpacks.stacks.bionic",
"io.paketo.stacks.tiny",
"org.cloudfoundry.stacks.cflinuxfs3"
],
"uri": "https://buildpacks.cloudfoundry.org/dependencies/go/go_1.14.14_linux_x64_cflinuxfs3_2b6ff1d4.tgz",
"version": "1.14.14"
},
"buildpacks": {
"id": "paketo-buildpacks/go-dist",
"version": "0.2.8"
}
}
],
"local": null,
"localError": "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
}
Signed-off-by: dwillist <dthornton@vmware.com>
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.
✅ Accepted
# DOCKER DAEMON SHUTOFF
❯ pack-dev inspect-image buildpacksio/pack:latest --bom
{
"remote": [
{
"name": "go",
"metadata": {
"licenses": [],
"name": "Go",
"sha256": "2b6ff1d4025212d18db2c238cc6381b46c8da0e01de95705343ae529edb28e90",
"stacks": [
"io.buildpacks.stacks.bionic",
"io.paketo.stacks.tiny",
"org.cloudfoundry.stacks.cflinuxfs3"
],
"uri": "https://buildpacks.cloudfoundry.org/dependencies/go/go_1.14.14_linux_x64_cflinuxfs3_2b6ff1d4.tgz",
"version": "1.14.14"
},
"buildpacks": {
"id": "paketo-buildpacks/go-dist",
"version": "0.2.8"
}
}
],
"local": null,
"local_error": "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
}
❯ pack-dev inspect-buildpack paketobuildpacks/node-engine:0.1.6
Inspecting buildpack: paketobuildpacks/node-engine:0.1.6
REMOTE IMAGE:
Stacks:
ID: io.buildpacks.stacks.bionic
Mixins:
(omitted)
ID: org.cloudfoundry.stacks.cflinuxfs3
Mixins:
(omitted)
Buildpacks:
ID VERSION HOMEPAGE
paketo-buildpacks/node-engine 0.1.6 https://github.com/paketo-buildpacks/node-engine
Detection Order:
└ Group #1:
└ paketo-buildpacks/node-engine@0.1.6
# DOCKER DAEMON STARTED
❯ pack-dev inspect-buildpack paketobuildpacks/node-engine:0.1.6
Inspecting buildpack: paketobuildpacks/node-engine:0.1.6
REMOTE IMAGE:
Stacks:
ID: io.buildpacks.stacks.bionic
Mixins:
(omitted)
ID: org.cloudfoundry.stacks.cflinuxfs3
Mixins:
(omitted)
Buildpacks:
ID VERSION HOMEPAGE
paketo-buildpacks/node-engine 0.1.6 https://github.com/paketo-buildpacks/node-engine
Detection Order:
└ Group #1:
└ paketo-buildpacks/node-engine@0.1.6
❯ docker pull paketobuildpacks/node-engine:0.1.6
0.1.6: Pulling from paketobuildpacks/node-engine
8e25f377e7a0: Pull complete
Digest: sha256:93d162aad91dd2a358cd85b63c40006c166973dd90428cd06995d0898c98b61b
Status: Downloaded newer image for paketobuildpacks/node-engine:0.1.6
docker.io/paketobuildpacks/node-engine:0.1.6
❯ pack-dev inspect-buildpack paketobuildpacks/node-engine:0.1.6
Inspecting buildpack: paketobuildpacks/node-engine:0.1.6
LOCAL IMAGE:
Stacks:
ID: io.buildpacks.stacks.bionic
Mixins:
(omitted)
ID: org.cloudfoundry.stacks.cflinuxfs3
Mixins:
(omitted)
Buildpacks:
ID VERSION HOMEPAGE
paketo-buildpacks/node-engine 0.1.6 https://github.com/paketo-buildpacks/node-engine
Detection Order:
└ Group #1:
└ paketo-buildpacks/node-engine@0.1.6
REMOTE IMAGE:
Stacks:
ID: io.buildpacks.stacks.bionic
Mixins:
(omitted)
ID: org.cloudfoundry.stacks.cflinuxfs3
Mixins:
(omitted)
Buildpacks:
ID VERSION HOMEPAGE
paketo-buildpacks/node-engine 0.1.6 https://github.com/paketo-buildpacks/node-engine
Detection Order:
└ Group #1:
└ paketo-buildpacks/node-engine@0.1.6
EDIT: Added pack inspect-buildpack
user acceptance tests
pack buildpack inspect
now works when no docker daemon is available
Signed-off-by: dwillist dthornton@vmware.com
Summary
Resolves a bug around inspecting buildpacks when no docker daemon is running.
Previously this just returned an error indicating the docker daemon was not running.
Now it returns the result of the remote inspection.
PS.
There is some work to do around standardizing these inspection commands. Seems like we should not show errors unless users explicitly ask for them.
Related
Resolves #1095