brief digression from my discussion of docker roadmap and stuff like that ... i'm using the sample Dockerfiles from the "fedora-dockerfiles" package to demonstrate various Dockerfile instructions in an upcoming course, and i ran across this:
cockpit-ws/Dockerfile:LABEL INSTALL /usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-install cockpit-ws/Dockerfile:LABEL UNINSTALL /usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /cockpit/atomic-uninstall cockpit-ws/Dockerfile:LABEL RUN /usr/bin/docker run -d --privileged --pid=host -v /:/host IMAGE /container/atomic-run --local-ssh
i have no idea what those lines mean, they don't even seem valid as the documentation suggests the proper form of a Dockerfile LABEL instruction requires an "=" sign.
what does the above mean, if anything?
rday
On 08/10/2015 05:43 AM, Robert P. J. Day wrote:
brief digression from my discussion of docker roadmap and stuff like that ... i'm using the sample Dockerfiles from the "fedora-dockerfiles" package to demonstrate various Dockerfile instructions in an upcoming course, and i ran across this:
cockpit-ws/Dockerfile:LABEL INSTALL /usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-install cockpit-ws/Dockerfile:LABEL UNINSTALL /usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /cockpit/atomic-uninstall cockpit-ws/Dockerfile:LABEL RUN /usr/bin/docker run -d --privileged --pid=host -v /:/host IMAGE /container/atomic-run --local-ssh
i have no idea what those lines mean, they don't even seem valid as the documentation suggests the proper form of a Dockerfile LABEL instruction requires an "=" sign.
what does the above mean, if anything?
rday
I think the = sign is optional. Although I would prefer it in the form of
LABEL INSTALL="/usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-install"
And with the latest atomic we now support
LABEL INSTALL="/usr/bin/docker run -ti --rm --privileged -v /:/host ${IMAGE} /container/atomic-install"
On Mon, 10 Aug 2015, Daniel J Walsh wrote:
On 08/10/2015 05:43 AM, Robert P. J. Day wrote:
brief digression from my discussion of docker roadmap and stuff like that ... i'm using the sample Dockerfiles from the "fedora-dockerfiles" package to demonstrate various Dockerfile instructions in an upcoming course, and i ran across this:
cockpit-ws/Dockerfile:LABEL INSTALL /usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-install cockpit-ws/Dockerfile:LABEL UNINSTALL /usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /cockpit/atomic-uninstall cockpit-ws/Dockerfile:LABEL RUN /usr/bin/docker run -d --privileged --pid=host -v /:/host IMAGE /container/atomic-run --local-ssh
i have no idea what those lines mean, they don't even seem valid as the documentation suggests the proper form of a Dockerfile LABEL instruction requires an "=" sign.
what does the above mean, if anything?
rday
I think the = sign is optional.
ah, "man Dockerfile" doesn't mention that -- bugzilla time?
Although I would prefer it in the form of
LABEL INSTALL="/usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-install"
as would i. by the way, i'm assuming there's nothing magical about the labels INSTALL, UNINSTALL or RUN, right? they're simply being added as metadata to the image as documentation that someone can dig out later with "docker inspect"? beyond that, they have no special power, is that correct?
And with the latest atomic we now support
LABEL INSTALL="/usr/bin/docker run -ti --rm --privileged -v /:/host ${IMAGE} /container/atomic-install"
just to clarify these two uses of IMAGE, the first one will simply keep the literal string "IMAGE", correct? while the second will use escaping so that the label saved will incorporate the literal string "$(IMAGE}" -- i'm assuming to show the reader that that is supposed to represent an image name?
rday
On 08/10/2015 08:31 AM, Robert P. J. Day wrote:
On Mon, 10 Aug 2015, Daniel J Walsh wrote:
On 08/10/2015 05:43 AM, Robert P. J. Day wrote:
brief digression from my discussion of docker roadmap and stuff like that ... i'm using the sample Dockerfiles from the "fedora-dockerfiles" package to demonstrate various Dockerfile instructions in an upcoming course, and i ran across this:
cockpit-ws/Dockerfile:LABEL INSTALL /usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-install cockpit-ws/Dockerfile:LABEL UNINSTALL /usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /cockpit/atomic-uninstall cockpit-ws/Dockerfile:LABEL RUN /usr/bin/docker run -d --privileged --pid=host -v /:/host IMAGE /container/atomic-run --local-ssh
i have no idea what those lines mean, they don't even seem valid as the documentation suggests the proper form of a Dockerfile LABEL instruction requires an "=" sign.
what does the above mean, if anything?
rday
I think the = sign is optional.
ah, "man Dockerfile" doesn't mention that -- bugzilla time?
Although I would prefer it in the form of
LABEL INSTALL="/usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-install"
as would i. by the way, i'm assuming there's nothing magical about the labels INSTALL, UNINSTALL or RUN, right? they're simply being added as metadata to the image as documentation that someone can dig out later with "docker inspect"? beyond that, they have no special power, is that correct?
The special power it the "atomic run|install|uninstall" command will automatically use them
atomic install cockpit-ws
Does a
docker pull cockpit-ws
Then docker inspect to get the INSTALL label, then it executes the INSTALL label substituting environment variables like ${NAME} and ${IMAGE}
Do a man atomic.
And with the latest atomic we now support
LABEL INSTALL="/usr/bin/docker run -ti --rm --privileged -v /:/host ${IMAGE} /container/atomic-install"
just to clarify these two uses of IMAGE, the first one will simply keep the literal string "IMAGE", correct? while the second will use escaping so that the label saved will incorporate the literal string "$(IMAGE}" -- i'm assuming to show the reader that that is supposed to represent an image name?
rday
No in either case IMAGE will be substituted with the image specified on the atomic install command.
Here are a couple of blogs on the atomic command
http://developerblog.redhat.com/2015/04/21/introducing-the-atomic-command/ http://www.projectatomic.io/blog/2015/04/using-environment-substitution-with...
atomic command is available for both fedora and fedora atomic host.
On 08/10/2015 08:43 AM, Daniel J Walsh wrote:
On 08/10/2015 08:31 AM, Robert P. J. Day wrote:
On Mon, 10 Aug 2015, Daniel J Walsh wrote:
On 08/10/2015 05:43 AM, Robert P. J. Day wrote:
brief digression from my discussion of docker roadmap and stuff like that ... i'm using the sample Dockerfiles from the "fedora-dockerfiles" package to demonstrate various Dockerfile instructions in an upcoming course, and i ran across this:
cockpit-ws/Dockerfile:LABEL INSTALL /usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-install cockpit-ws/Dockerfile:LABEL UNINSTALL /usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /cockpit/atomic-uninstall cockpit-ws/Dockerfile:LABEL RUN /usr/bin/docker run -d --privileged --pid=host -v /:/host IMAGE /container/atomic-run --local-ssh
i have no idea what those lines mean, they don't even seem valid as the documentation suggests the proper form of a Dockerfile LABEL instruction requires an "=" sign.
what does the above mean, if anything?
rday
I think the = sign is optional.
ah, "man Dockerfile" doesn't mention that -- bugzilla time?
Although I would prefer it in the form of
LABEL INSTALL="/usr/bin/docker run -ti --rm --privileged -v /:/host IMAGE /container/atomic-install"
as would i. by the way, i'm assuming there's nothing magical about the labels INSTALL, UNINSTALL or RUN, right? they're simply being added as metadata to the image as documentation that someone can dig out later with "docker inspect"? beyond that, they have no special power, is that correct?
The special power it the "atomic run|install|uninstall" command will automatically use them
atomic install cockpit-ws
Does a
docker pull cockpit-ws
Then docker inspect to get the INSTALL label, then it executes the INSTALL label substituting environment variables like ${NAME} and ${IMAGE}
Do a man atomic.
And with the latest atomic we now support
LABEL INSTALL="/usr/bin/docker run -ti --rm --privileged -v /:/host ${IMAGE} /container/atomic-install"
just to clarify these two uses of IMAGE, the first one will simply keep the literal string "IMAGE", correct? while the second will use escaping so that the label saved will incorporate the literal string "$(IMAGE}" -- i'm assuming to show the reader that that is supposed to represent an image name?
rday
No in either case IMAGE will be substituted with the image specified on the atomic install command.
On Mon, 10 Aug 2015, Daniel J Walsh wrote:
Here are a couple of blogs on the atomic command
http://developerblog.redhat.com/2015/04/21/introducing-the-atomic-command/ http://www.projectatomic.io/blog/2015/04/using-environment-substitution-with...
atomic command is available for both fedora and fedora atomic host.
hmmmmmm ... didn't take long to run into issues:
$ man atomic-defaults
ATOMIC(1) January 2015 ATOMIC(1)
NAME atomic - List default commands
SYNOPSIS atomic defaults [-h] IMAGE
DESCRIPTION atomic defaults list default commands with which atomic will RUN/INSTALL/REMOVE containers. ... snip ...
ok, then:
$ atomic defaults fedora /usr/bin/atomic: invalid choice: 'defaults' (choose from 'info', 'install', 'images', 'mount', 'stop', 'run', 'uninstall', 'unmount', 'update', 'upload', 'version', 'verify') Try 'atomic --help' for more information. $
the list in that error message isn't even complete (it's missing "atomic host"), but why does the "atomic" command not accept the "defaults" subcommand?
rday
Wow, we removed this command a while ago and I guess forgot to remove the man page.
atomic info
Will show you the labels.
Latest atomic has added --display command
atomic install imagename --display
Will show the command that will be executed without executing it.
On 08/10/2015 02:53 PM, Robert P. J. Day wrote:
On Mon, 10 Aug 2015, Daniel J Walsh wrote:
Here are a couple of blogs on the atomic command
http://developerblog.redhat.com/2015/04/21/introducing-the-atomic-command/ http://www.projectatomic.io/blog/2015/04/using-environment-substitution-with...
atomic command is available for both fedora and fedora atomic host.
hmmmmmm ... didn't take long to run into issues:
$ man atomic-defaults
ATOMIC(1) January 2015 ATOMIC(1)
NAME atomic - List default commands
SYNOPSIS atomic defaults [-h] IMAGE
DESCRIPTION atomic defaults list default commands with which atomic will RUN/INSTALL/REMOVE containers. ... snip ...
ok, then:
$ atomic defaults fedora /usr/bin/atomic: invalid choice: 'defaults' (choose from 'info', 'install', 'images', 'mount', 'stop', 'run', 'uninstall', 'unmount', 'update', 'upload', 'version', 'verify') Try 'atomic --help' for more information. $
the list in that error message isn't even complete (it's missing "atomic host"), but why does the "atomic" command not accept the "defaults" subcommand?
rday