Skip to content

LCOW: Builder platform API#34401

Closed
lowenna wants to merge 1 commit intomoby:masterfrom
microsoft:jjh/buildplatformapi
Closed

LCOW: Builder platform API#34401
lowenna wants to merge 1 commit intomoby:masterfrom
microsoft:jjh/buildplatformapi

Conversation

@lowenna
Copy link
Member

@lowenna lowenna commented Aug 4, 2017

Signed-off-by: John Howard jhoward@microsoft.com

This removes all the // TODO @jhowardmsft LCOW Support:.... from the builder. It adds platform to the build API as per the epic at #33850. Will open the client API to match this shortly.

PS E:\docker\build\lcow> docker build --no-cache -f test3 --platform=linux .
Sending build context to Docker daemon   5.12kB
Step 1/3 : FROM busybox
 ---> efe10ee6727f
Step 2/3 : RUN mkdir /foo
 ---> Running in b77c17688016
 ---> 27efb69d2070
Removing intermediate container b77c17688016
Step 3/3 : RUN ls -l /
 ---> Running in e1e791738de1
total 40
drwxr-xr-x    2 root     root         12288 Jul 19 20:56 bin
drwxr-xr-x    4 root     root           320 Aug  4 00:55 dev
drwxr-xr-x    1 root     root          4096 Jul 19 20:56 etc
drwxr-xr-x    2 root     root          4096 Aug  4 00:55 foo
drwxr-xr-x    2 nobody   nogroup       4096 Jul 19 20:56 home
dr-xr-xr-x  105 root     root             0 Aug  4 00:55 proc
drwxr-xr-x    2 root     root          4096 Jul 19 20:56 root
dr-xr-xr-x   12 root     root             0 Aug  4 00:55 sys
drwxrwxrwt    2 root     root          4096 Jul 19 20:56 tmp
drwxr-xr-x    3 root     root          4096 Jul 19 20:56 usr
drwxr-xr-x    4 root     root          4096 Jul 19 20:56 var
 ---> 2fc0de70c186
Removing intermediate container e1e791738de1
Successfully built 2fc0de70c186
PS E:\docker\build\lcow>

Signed-off-by: John Howard <jhoward@microsoft.com>

This removes all the `// TODO @jhowardmsft LCOW Support:....`
from the builder. It adds `platform` to the build API as per
the epic at moby#33850
@lowenna
Copy link
Member Author

lowenna commented Aug 4, 2017

@johnstep FYI

@dnephin
Copy link
Member

dnephin commented Aug 4, 2017

Do we really need this parameter? In most cases we can infer this from the base image, right?

If the base image is multi-platform then we need some way in the dockerfile to specify which platform we're targeting. I believe I saw a suggestion from @tonistiigi about that. Maybe:

FROM --platform windows IMAGE:TAG

Is that not an option?

@lowenna
Copy link
Member Author

lowenna commented Aug 4, 2017

@dnephin I had to put a stake in the ground somewhere to start that discusssion. Both are doable, although a parser directive is slightly more easy on implementation. Let's discuss the semantics in #33854 leaving this PR for the implementation of it.

@PatrickLang FYI

ImageID() string
RunConfig() *container.Config
MarshalJSON() ([]byte, error)
Platform() string
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use the full, OCI-style platform descriptor for this.

@lowenna
Copy link
Member Author

lowenna commented Aug 27, 2017

Closing. Replaced by #34642

@lowenna lowenna closed this Aug 27, 2017
@thaJeztah thaJeztah added the area/lcow Issues and PR's related to the experimental LCOW feature label Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/lcow Issues and PR's related to the experimental LCOW feature status/0-triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants