-
Notifications
You must be signed in to change notification settings - Fork 231
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
add --label flag support to img build #178
Conversation
I tested by building this Dockerfile with the following $ img build --label "version=1.68.0" --label "date=2018-10-19" -t westonsteimel/img-label-test . I then loaded it into docker, ran $ img save westonsteimel/img-label-test | docker load
$ docker inspect westonsteimel/img-label-test
[
{
"Id": "sha256:ceb18563e6bceefaa835ec1a27e682f941439075540a7fff8fe81dea370f6d20",
"RepoTags": [
"westonsteimel/img-label-test:latest"
],
"RepoDigests": [],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2018-10-09T23:49:00.403370381+01:00",
"Container": "",
"ContainerConfig": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Cmd": null,
"Image": "",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"DockerVersion": "",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"BOOST_VERSION=1.68.0"
],
"Cmd": [
"sh"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"Description": "Boost C++ libraries on Alpine Linux",
"date": "2018-10-19",
"version": "1.68.0"
}
},
"Architecture": "amd64",
"Os": "linux",
"Size": 142137617,
"VirtualSize": 142137617,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/4bb676b4df9a0d1ed8dd7855931e19917a501944e5af5a12e7672db2177adc66/diff",
"MergedDir": "/var/lib/docker/overlay2/f2a907da5395d4365cd0a1825d95493ec1887ff3e2d53b25305955925a241686/merged",
"UpperDir": "/var/lib/docker/overlay2/f2a907da5395d4365cd0a1825d95493ec1887ff3e2d53b25305955925a241686/diff",
"WorkDir": "/var/lib/docker/overlay2/f2a907da5395d4365cd0a1825d95493ec1887ff3e2d53b25305955925a241686/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:df64d3292fd6194b7865d7326af5255db6d81e9df29f48adde61a918fbd8c332",
"sha256:eadd0972a6d0c0259010fdb40e4266f4a8362cac8fe1fe71a606a9e88580dd68"
]
},
"Metadata": {
"LastTagTime": "0001-01-01T00:00:00Z"
}
}
]
|
Signed-off-by: Weston Steimel <[email protected]>
ah cool can you add a test to the test file for build as well! thanks! |
Sure, I can give it a go. I'm a bit unsure of how to view the metadata in order to check that the labels have been applied following the build without |
No worries about that :)
On Tue, Oct 23, 2018 at 00:02 Weston Steimel ***@***.***> wrote:
Sure, I can give it a go. I'm a bit unsure of how to view the metadata in
order to check that the labels have been applied following the build
without docker inspect though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#178 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABYNbBayD5LPDEY-Fc17Bd-IQvjMMAhoks5unr8AgaJpZM4XvaYV>
.
--
Jessie Frazelle
4096R / D4C4 DD60 0D66 F65A 8EFC 511E 18F3 685C 0022 BFF3
pgp.mit.edu <http://pgp.mit.edu/pks/lookup?op=get&search=0x18F3685C0022BFF3>
|
Codecov Report
@@ Coverage Diff @@
## master #178 +/- ##
=====================================
Coverage 0% 0%
=====================================
Files 13 13
Lines 729 735 +6
=====================================
- Misses 729 735 +6
Continue to review full report at Codecov.
|
Thanks, I've added a test. Does it seem reasonable enough? |
Signed-off-by: Weston Steimel <[email protected]>
thanks so much! |
oh if you have time want to update the readme too, just realized :) thanks again! |
No problem. Yeah, I can update the readme in about an hour or so. |
thanks so much!
…On Tue, Oct 23, 2018 at 11:02 AM Weston Steimel ***@***.***> wrote:
No problem. Yeah, I can update the readme in about an hour or so.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#178 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABYNbBi5r2nFveJB9OWUBguxtOMxLfM1ks5un1m2gaJpZM4XvaYV>
.
--
Jessie Frazelle
4096R / D4C4 DD60 0D66 F65A 8EFC 511E 18F3 685C 0022 BFF3
pgp.mit.edu <http://pgp.mit.edu/pks/lookup?op=get&search=0x18F3685C0022BFF3>
|
Adds support for
img build --label
per #168.