Commit Graph

614 Commits (072078a403ae4106f87f7225c7188f31ec8b6419)

Author SHA1 Message Date
Tonis Tiigi ab9dc87705 dockerfile: allow lowercase dockerfile name
This was supported by the legacy builder moby/moby#10858


Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-18 23:31:26 -08:00
Sebastiaan van Stijn 67bcfe699a
copy containerd.UnknownExitStatus to local const
Copy this const to a local constant to prevent importing the containerd
client in the front-end.

For consistency, I also updated the executor code to use the same const,
although not strictly needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-18 00:11:09 +01:00
Tonis Tiigi 81f74a9c89 dockerfile: rename experimental channel to labs
Experimental name confuses users as backwards compatibility
rules are different for other tools called experimental.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-17 07:42:50 -08:00
Tõnis Tiigi 2aa3e0bd42
Merge pull request #1395 from lugeng/fix-load-metadata
dockerfile build:  fix not exit when meet error in load config metadata
2020-11-17 00:30:06 -08:00
岁丰 adca74632e dockerfile build: return error when meet error in load config metadata
Signed-off-by: genglu <genglu.gl@antfin.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-16 17:16:02 -08:00
Edgar Lee 1240dd7795 Return committed readonly inputs and actives in exec error in MountIDs
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-16 13:21:23 -08:00
Edgar Lee 3ba6cd7bc2 Fix ExecError.EachRef invoking callback with possibly nil solver.Results
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 23:20:41 -08:00
Edgar Lee 4c0ca1719f Fix container release not capturing closure of loop variable
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:58:49 -08:00
Edgar Lee dfaf613996 Parallelize unlazying ref proxy in the gateway forwarder
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:14:05 -08:00
Edgar Lee c33bcd61a2 Rename OutputIDs to MountIDs
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee bcff7baf60 Allow scratch mounts with gateway.RunContainer
- Plumb default worker by adding GetDefault() to frontend.WorkerInfos
- To avoid cyclic dependency, refactor frontend.WorkerInfos to worker.Infos
- Refactor gateway.NewContainer to share code with llbsolver/ops/exec.go

Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee 7e1dc9bec1 Refactor to file action indexed outputs
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee 2d23d0cc43 Fix lint and unit tests for fileopsolver
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee 7ce58c31ba Plumb op metadata to recreate failed ops with gateway exec
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Tonis Tiigi bdcee17437 executor: change mount to struct
Allows readonly passed cleanly.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-02 22:20:51 -08:00
Tonis Tiigi e3b05289d8 add session injection to remote loading
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-02 22:20:44 -08:00
Sebastiaan van Stijn 40e6129775
frontend/dockerfile: use dockerignore package from buildkit
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-30 11:55:05 +01:00
Sebastiaan van Stijn 31edeb3eab
dockerignore: remove import path enforcement comments
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-30 11:52:59 +01:00
Sebastiaan van Stijn a9580f569a
Migrate github.com/docker/docker/builder/dockerignore to BuildKit repository
Strategy taken:

    # install filter-repo (https://github.com/newren/git-filter-repo/blob/main/INSTALL.md)
    brew install git-filter-repo

    cd ~/projects

    # create a temporary clone of docker
    git clone https://github.com/docker/docker.git docker_TEMP
    cd docker_TEMP

    # remove the origin remote (just for safety)
    git remote remove origin

    # create branch to work with
    git checkout -b migrate_dockerignore

    # remove all code, except for builder/dockerignore, and rewrite the files to frontend/dockerfile/dockerignore.
    git filter-repo --force --path builder/dockerignore --path-rename builder/dockerignore:frontend/dockerfile/dockerignore

    # check the results
    tree
    .
    └── frontend
        └── dockerfile
            └── dockerignore
                ├── dockerignore.go
                └── dockerignore_test.go

    3 directories, 2 files

    # go to the target github.com/moby/sys repository
    cd ~/projects/buildkit

    # create a branch to work with
    git checkout -b integrate_dockerignore

    # add the temporary repository as an upstream and make sure it's up-to-date
    git remote add docker_TEMP ~/projects/docker_TEMP
    git fetch docker_TEMP

    # merge the upstream code
    git merge --allow-unrelated-histories --signoff -S docker_TEMP/migrate_dockerignore

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-30 11:51:18 +01:00
Tibor Vass 6b1c950745
Merge pull request #1559 from thaJeztah/fix_trailing_escape
Dockerfile: fix parsing of trailing backslash
2020-10-28 23:54:42 -07:00
Cory Bennett ffd4ab232e gateway exec: add platform and worker constraints to NewContainer api
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-28 03:54:49 +00:00
Sebastiaan van Stijn cc7a3ded6f
Dockerfile: fix parsing of trailing backslash
If the line-continuation marker (`\`) is escaped, it should not be
treated as such, but as a literal backslash.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-26 12:29:05 +01:00
Sebastiaan van Stijn e367fd69c3
TestParseCases(): fix "expected" and "actual" being reversed
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-26 12:27:17 +01:00
Tonis Tiigi cec6dae19d dockerfile: add test for default shell and path
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-24 11:12:15 -07:00
Tonis Tiigi 63856b6a36 dockerfile: set default shell based on OS
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-23 15:30:23 -07:00
Tonis Tiigi ecf070a027 exec: use platform specific default path
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-23 15:30:23 -07:00
Akihiro Suda dda009a58c
Merge pull request #1739 from tonistiigi/empty-layer
clear file mount stubs and fix empty layer cases
2020-10-21 00:42:45 +09:00
Edgar Lee 5eaecb905c
Merge pull request #1731 from coryb/issue-1714
add tty support for runc executor
2020-10-19 14:52:31 -07:00
Tonis Tiigi 17b4ca1edf executor: remove stub files from rootfs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-18 23:39:17 -07:00
Cory Bennett cb12a5642f shutdown container process when context is done
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-17 06:53:25 +00:00
Lu Jingxiao 059dac1e05 tests: Adding tests for hostname specifying for building
Adding tests to for hostname specifying for image building

Cover: #1301
Signed-off-by: Lu Jingxiao <lujingxiao@huawei.com>
2020-10-14 15:36:47 +08:00
Lu Jingxiao 5e7ae230b2 Add hostname specifying for building
Fix: #1301

Signed-off-by: Lu Jingxiao <lujingxiao@huawei.com>
2020-10-14 14:45:36 +08:00
Tibor Vass 7bdb6592c5
Merge pull request #1693 from tonistiigi/dockerfile-comments
dockerfile: parse comments associated with args and stages
2020-10-13 00:20:49 -07:00
Tonis Tiigi 0a7f6ccf5e dockerfile: parse comments associated with args and stages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-12 23:11:23 -07:00
Tibor Vass 37bb903a31
Merge pull request #1724 from tonistiigi/subreq
frontend: support for subrequests
2020-10-12 11:43:59 -07:00
Tonis Tiigi b4fad847ac frontend: support for subrequests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-07 13:36:51 -07:00
Tonis Tiigi ba923cd67d hack: fix release script
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-06 23:42:37 -07:00
Akihiro Suda 0e916c2697
Merge pull request #1717 from tonistiigi/run-mount-stable
dockerfile: update run mounts to stable channel
2020-10-06 08:19:03 +09:00
Tonis Tiigi 906e34510d dockerfile: update run mounts to stable channel
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-04 22:22:08 -07:00
Tonis Tiigi 44f27708b3 frontend: make sure inputs support for frontends is detectable from client
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-04 10:44:16 -07:00
Akihiro Suda 78f3e86dc1
Merge pull request #1627 from coryb/gateway-exec-proto
update gateway to add ability to run and exec into containers
2020-10-04 20:11:45 +09:00
Ximo Guanter da8ebc8a39 Make HTTP/2 authority pseudo-header spec-compliant
Signed-off-by: Ximo Guanter <ximo.guanter@gmail.com>
2020-10-03 22:58:21 +02:00
Cory Bennett 398593b61d Simplify rpc exec exit error handling
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 21:35:51 +00:00
Cory Bennett 2f0738c47a Default Cwd to "/"
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 20:54:00 +00:00
Cory Bennett d1a14ae768 use grpc typed error for ExitMessage error
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 07:36:45 +00:00
Cory Bennett e824c5e916 fix linting error
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 07:17:47 +00:00
Cory Bennett 095a919c95 remove unnecessary MountManager interface
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 06:24:34 +00:00
Cory Bennett ea3bc24b7c Move SecurityMode to InitMessage from NewContainer message so it can be per process
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 05:36:33 +00:00
Cory Bennett 03e1c199a3 remove SessonManager from FrontendLLBBridge, adding as arg to Frontend.Solve
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 01:59:05 +00:00
Tonis Tiigi c810b8ed25 dockerfile: allow multiple values for ARG
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-09-22 11:56:51 -07:00