Commit Graph

496 Commits (40cf375d0b584437b15bfaee4b30a6038fba8940)

Author SHA1 Message Date
Tibor Vass 1218e37c23 dockerfile/docs: fix frontend image tags
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-12-20 23:24:04 +00:00
Tibor Vass 40a36f455f docs: Change buildkit 0.8.0 -> 0.8.1 and an instance of dockerfile 1.2.0 to 1.2
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-12-15 05:34:11 +00:00
Tonis Tiigi 9f6172c8bd docs: update external dockerfile docs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-08 21:26:18 -08:00
Sebastiaan van Stijn 4e9bae48e7
Revert "Ensure ENTRYPOINT command has at least one argument"
This reverts commit 174bcf85ef.

This commit attempted to fix a situation where an empty entrypoint
was specified, causing a confusing error when running the image,
however, allowing the entrypoint to be reset should be a valid
use-case, and running such image on docker 20.10 at least
produces an informative error;

    docker build -t foo -<<'EOF'
    FROM busybox
    ENTRYPOINT []
    EOF

Or, to reset a previously set entrypoint:

    docker build -t foo -<<'EOF'
    FROM busybox AS one
    ENTRYPOINT ["/bin/busybox"]

    FROM one AS two
    ENTRYPOINT []
    EOF

If no command is specified for the image above:

    docker run -it --rm foo
    docker: Error response from daemon: No command specified.
    See 'docker run --help'.

Passing a command to run:

    docker run -it --rm foo sh
    /#

Given that this commit resulted in a regression/breaking change
this reverts the commit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-12-03 13:36:52 +01:00
Tonis Tiigi 2df822c610 dockerfile: fix escaping in release script
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-02 19:02:21 -08:00
Andrew Chang 174bcf85ef Ensure ENTRYPOINT command has at least one argument
Signed-off-by: Andrew Chang <chang331006@gmail.com>
2020-12-01 15:05:25 -06:00
CrazyMax 1ac6bd4cbc
Fix CI cache
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-11-29 06:45:39 +01:00
CrazyMax d754dda292
Refactor frontend for GitHub Actions
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-11-26 02:13:18 +01:00
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
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
岁丰 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
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
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
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
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
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
Tonis Tiigi b18c08c4ab fix tests after busybox update
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-09-11 23:24:55 -07:00
Wang Yumu 882fc73790 build-arg add support BUILDKIT_SYNTAX
Signed-off-by: Wang Yumu <37442693@qq.com>
2020-08-18 18:05:57 +08:00
Paul "TBBle" Hampson 31195373cf Don't rely on sh being in the PATH on Windows for tests
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Tonis Tiigi 5da4a40ae8 lint: enable more linters
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi c8190b1518 lint: enable golint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:24 -07:00
Paul "TBBle" Hampson 25f50eb711 Wrap original error when failing to read download context
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-17 02:35:16 +10:00
Paul "TBBle" Hampson 156d66da02 Revert "Pin containerd runtime to v1"
This reverts commit 9290c15ffc.

This was pinned during the upgrade to containerd 1.3 series, which
changed the default runtime on Linux to io.containerd.runc.v2.

No specific rationale was listed for this pinning, and clearly it's the
wrong thing to do in the presence of Windows, which does not have this
runtime.

Instead, we rely on the containerd-internal defaults, which distinguish
the runtimes for Linux and Windows.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-16 15:06:20 +10:00
Erik Sipsma 463ec47ba0 client test: Fix check for whether sandbox has containerd
Before this, the check was always returning that containerd wasn't running and
thus skipping the rest of several test cases.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-06-21 20:42:53 -07:00
Chenbin b7fd382230 add chmod in COPY and ADD command
Signed-off-by: Chenbin <chen.bin11@zte.com.cn>
2020-06-10 21:37:46 +08:00
Edgar Lee 7c81e16b8a Fix duplicate source maps and fix issue preventing multiple locations per source map
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 18:48:20 -07:00
Edgar Lee 59fa9fc9a0 Allow multiple source locations to be added as a constraint
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 16:48:44 -07:00
Edgar Lee 7a90a36b46 Support multiple source maps and locations for source-level stacktraces
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 16:17:35 -07:00
Tonis Tiigi 6dee7ee0fc dockerfile: add source mapping tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-19 17:22:21 -07:00
Tonis Tiigi e536302180 dockerfile: keep mapping on #syntax error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:50:08 -07:00
Tonis Tiigi 6073e6cff3 llb: enable source tracking
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:50:03 -07:00
Tonis Tiigi 1f9599aba3 llb: move source mapping to llb metadata
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:49:41 -07:00
Jörg Franke 5f23bdf9d0 Expand chown value of ADD command
Signed-off-by: Jörg Franke <359489+NewJorg@users.noreply.github.com>
2020-05-02 19:37:23 +02:00
Tonis Tiigi 90288ab716 errdefs: update to new packages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-24 11:25:44 -07:00
Tonis Tiigi 4b2636acca dockerfile: add more source information to errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -07:00