Commit Graph

8377 Commits

Author SHA1 Message Date
David Gageot
c977b1b306
Use faster gzip library
Signed-off-by: David Gageot <david.gageot@docker.com>
2022-10-06 13:08:56 +02:00
Rolf Neugebauer
0a223ec205
Merge pull request #3829 from jf/update_platform-aws_docs
docs/platform-aws.md: add crucial note about ENA for `linuxkit push aws`
2022-10-06 09:35:25 +01:00
David Gageot
780c28dba7
Memoize docker client to avoid consuming a new ssh connection each time
Signed-off-by: David Gageot <david.gageot@docker.com>
2022-10-03 15:22:21 +02:00
David Gageot
ea863184ce
Support connecting to docker over ssh
Signed-off-by: David Gageot <david.gageot@docker.com>
2022-10-03 14:25:09 +02:00
David Gageot
4df610741d
Don't use deprecated api
Signed-off-by: David Gageot <david.gageot@docker.com>
2022-10-03 14:10:15 +02:00
Jeffrey 'jf' Lim
3950e55e00
Fix examples/platform-aws.yml: add dhcpcd service to keep instance reachable after lease
Signed-off-by: Jeffrey 'jf' Lim <jf@users.noreply.github.com>
2022-10-02 17:09:16 +08:00
Jeffrey 'jf' Lim
5f1ae239bb
docs/platform-aws.md: add crucial note about ENA for linuxkit push aws
Signed-off-by: Jeffrey 'jf' Lim <jf@users.noreply.github.com>
2022-09-28 21:40:13 +08:00
Rolf Neugebauer
d589bd18f1
Merge pull request #3828 from deitch/set-cache-via-env-var
allow setting cache dir via env var
2022-09-24 14:05:32 +01:00
Avi Deitcher
cec33f0c84 allow setting cache dir via env var
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-09-23 13:27:14 +03:00
Avi Deitcher
e532e73108
Merge pull request #3825 from giggsoff/fix-dep
Fix github.com/docker/go-units import
2022-09-13 16:51:24 +03:00
Petr Fedchenkov
227b02a8bd
Fix github.com/docker/go-units import
Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-09-13 14:52:32 +03:00
Avi Deitcher
5f3856c94c
Merge pull request #3823 from giggsoff/clean_builder_cache
Builder disk usage and clean
2022-09-13 14:47:09 +03:00
Petr Fedchenkov
45a5c97931
Builder disk usage and clean
We use dedicated docker container as builder and we are able to clean
data inside only by re-creating of it. Let's add disk usage and clean
commands for builder.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-09-13 13:33:46 +03:00
Avi Deitcher
3008215556
Merge pull request #3824 from giggsoff/fix-push
Fix bug: when request to build multiple arches, if one already found, it skips the others
2022-09-13 13:21:48 +03:00
Petr Fedchenkov
57148029cd
Fix consistently building of multiple arch
We cannot build for another arch after building for one arch because of
setting skipBuild to true if one arch found. In other words "linuxkit
pkg build --platforms linux/riscv64,linux/amd64 ..." after "linuxkit pkg
 build --platforms linux/amd64 ..." will not build for linux/riscv64
 which is not expected.

In general when we check for available images and able to found part of
platforms we do not want to rebuild all of them. So this PR includes
platformsToBuild slice which we fill with platforms we want to build for
.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-09-13 11:58:23 +03:00
Avi Deitcher
86cc42bf79
Merge pull request #3822 from giggsoff/allow_build_without_cgo
Allow build for darwin without CGO
2022-09-12 14:49:01 +03:00
Petr Fedchenkov
a46e6af650
Allow build for darwin without CGO
It is not easy to use cross-platform build with CGO enabled so lets
allow build without cgo for darwin and use virtualization framework only
 if we built with CGO.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-09-12 11:41:37 +03:00
Avi Deitcher
ceaeac88b6
Merge pull request #3818 from deitch/optional-tag
add option to override tag name when exporting
2022-09-12 09:48:52 +03:00
Avi Deitcher
7c4e89b652
Merge pull request #3821 from giggsoff/do-not-calculate-broken-symlinks
Skip files in contentHash()
2022-09-08 20:58:13 +03:00
Petr Fedchenkov
49f8faffe0
Skip files in contentHash()
If we cannot open file for some reason it is better to skip it instead
of exit. Also we should skip symlinks and directories.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-09-08 17:34:21 +03:00
Avi Deitcher
9b636cbf25
Merge pull request #3820 from giggsoff/fix-riscv64-arch
Add all valid arches to ImageLoad
2022-09-08 14:16:03 +03:00
Petr Fedchenkov
3699177d1a
Add all valid arches to ImageLoad
We should expand the list of supported arches to be able to build them if we want. Without this we will stuck on sending tarball during build for riscv64.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-09-08 12:14:49 +03:00
Avi Deitcher
fc060cac15
Merge pull request #3819 from giggsoff/dirty-fix
Append dirty tag with content hash
2022-09-07 12:49:48 +03:00
Petr Fedchenkov
8217737525
Append dirty tag with content hash
To be able to identify successive file changes without commit, we should
 use their hash in tag alongside with dirty flag
 (<ls-tree>-dirty-<content hash>).

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-09-07 11:29:43 +03:00
Avi Deitcher
3a2ecfc6d5 add option to override tag name when exporting
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-09-06 14:18:49 +03:00
Avi Deitcher
5f37332f4a
Merge pull request #3816 from deitch/cache-export-filesystem
add ability to export filesystem
2022-09-05 11:08:28 +03:00
Avi Deitcher
7e65df33be add ability to export filesystem
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-08-29 18:23:43 +03:00
Avi Deitcher
1303ae4e73
Merge pull request #3810 from giggsoff/do-not-pull-another-arch
Do not pull another arch and index cleanup
2022-08-25 15:27:12 +03:00
Petr Fedchenkov
fe46d9bf05
Do not pull another arch
We pull all arches for the image which is suboptimal in terms of storage
 consumption. Let's pull only required platforms.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-08-25 12:29:35 +03:00
Avi Deitcher
6d65e39e0a
Merge pull request #3815 from giggsoff/enable-tpm-uefi-aws
Enable uefi mode and tpm support for aws
2022-08-23 11:37:15 -04:00
Petr Fedchenkov
82681c0333
uefi and tpm flags for aws push
Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-08-23 10:58:24 +03:00
Petr Fedchenkov
364f66a5b8
Update aws vendoring and mod tidy
Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-08-23 10:23:45 +03:00
Avi Deitcher
1cf22ed0ac
Merge pull request #3812 from deitch/safer-cache-write
verbosity for pkg build and error catching
2022-08-22 11:32:55 -04:00
Avi Deitcher
bc5084df99 verbosity for pkg build and error catching
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-08-14 11:06:02 -07:00
Avi Deitcher
56a05f628f
Merge pull request #3808 from deitch/push-manifest-only
add ability to just update manifest
2022-08-07 01:26:18 -08:00
Avi Deitcher
acdfb911ac bump manifest-tool to support OCI index media-type and consume it
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-07-29 00:18:13 +03:00
Avi Deitcher
b28621b95a add ability to just update manifest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-07-28 10:46:45 +03:00
Avi Deitcher
239d4d9502
Merge pull request #3764 from deitch/virtualization-framework
add support for virtualization framework
2022-07-28 10:46:13 +03:00
Avi Deitcher
9c149a61b5
Merge pull request #3809 from giggsoff/fix-start-of-builder
Restart of the builder container
2022-07-27 20:23:52 +03:00
Petr Fedchenkov
2fd7ff7ff0
Restart of the builder container
We check only for existence of builder container and do not start it in
case of not running state. We should start it for example after reboot
of node to be able to build something.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-07-27 19:01:47 +03:00
David Scott
4bb25bda97 Fix Makefile
Before:
```
djs55@m1 linuxkit % make
make -C ./src/cmd/linuxkit
tar cf - -C . . | docker run --rm --net=none --log-driver=none -i -e GOOS= -e GOARCH= linuxkit/go-compile:7b1f5a37d2a93cd4a9aa2a87db264d8145944006 --package github.com/linuxkit/linuxkit/src/cmd/linuxkit --ldflags "-X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.GitCommit=a201652e0dabfc7f62b14ac1a43b5572a8ecae9a -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version="v0.8+"" -o linuxkit > tmp_linuxkit_bin.tar
gofmt...
govet...
golint...
ineffassign...
go build...

djs55@m1 linuxkit % file bin/linuxkit
bin/linuxkit: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), static-pie linked, Go BuildID=alxJ_URcsHKe5NnzKTgb/kT7Da_wy0_5L3jkAxzZ7/jVuNyKW2yhIE_wT0QFHL/g86-fS2la_qumeAPHD40, stripped

djs55@m1 linuxkit % ./bin/linuxkit
zsh: exec format error: ./bin/linuxkit
```

After:
```
djs55@m1 linuxkit % make
make -C ./src/cmd/linuxkit
CGO_ENABLED=1 go build -o /Users/djs55/github.com/djs55/linuxkit/bin/linuxkit  --ldflags "-X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.GitCommit=df47d22bce0a1767e6e0c967d9b516cc656d7db4 -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version="v0.8+""
codesign --entitlements linuxkit.entitlements --force -s - /Users/djs55/github.com/djs55/linuxkit/bin/linuxkit
/Users/djs55/github.com/djs55/linuxkit/bin/linuxkit: replacing existing signature

djs55@m1 linuxkit % file ./bin/linuxkit
./bin/linuxkit: Mach-O 64-bit executable arm64

djs55@m1 linuxkit % ./bin/linuxkit
Please specify a command.

USAGE: linuxkit [options] COMMAND
```

Signed-off-by: David Scott <dave@recoil.org>
2022-07-25 08:01:32 +01:00
David Scott
e97dda48c5
Merge pull request #3807 from dgageot/memlogd-json
Write log entries as json
2022-07-25 07:48:11 +01:00
Avi Deitcher
de1d8cdeda add support for virtualization framework
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2022-07-22 16:55:47 +03:00
David Scott
2bf3726a81
Merge pull request #3778 from NeilGerring/fix-bad-rebase
Fix a merge conflict in openstack.yml example
2022-07-22 06:06:57 -07:00
David Gageot
acbef4424a
Make the linter happy
Signed-off-by: David Gageot <david.gageot@docker.com>
2022-07-22 15:02:19 +02:00
David Gageot
0b136bf80d
Write log entries as json
Signed-off-by: David Gageot <david.gageot@docker.com>
2022-07-22 14:41:23 +02:00
Avi Deitcher
ea61ff95ce
Merge pull request #3806 from giggsoff/update-buildkit
Update buildkit to have platform fix
2022-07-22 07:36:07 -04:00
Petr Fedchenkov
3540a1bc34
Update buildkit to have platform fix
We noticed that we use host arch when we want to use previously build
image in oci-layout. Let's use fix on buildkit side and improve test.

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-07-22 12:25:39 +03:00
Avi Deitcher
3f25e09ab5
Merge pull request #3805 from giggsoff/fixes-for-chained
Ability to parse args from Dockerfile
2022-07-20 16:11:47 -04:00
Petr Fedchenkov
5763c4f4bc
Ability to parse args from Dockerfile
We should check if we have args in "FROM" and replace them:

ARG IMAGE=linuxkit/img
FROM ${IMAGE} as src

will be parsed as

FROM linuxkit/img as src

Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2022-07-20 17:07:43 +03:00