30 Commits

Author SHA1 Message Date
chenjiankun
c00617e26a docker: sync patches from upstream
Sync patches from upstream, including:
b033961a82
2a8341f252
cae76642b6
f43f820a8c
b1d05350ec
7a24e475b3
f89fd3df7d
76e4260141
b92585a470

(cherry picked from commit 964354b6885aa28a3668ccab6cf0c458206df30b)
2024-01-08 15:46:01 +08:00
zhongjiawei
937754a249 docker:add delay after freeze
(cherry picked from commit 2e48b57e25c721804c926c73370c33d3e769bc94)
2023-10-12 17:19:29 +08:00
Lu Jingxiao
0b26f41390 docker: fix COPY --from should preserve ownership
Fixes: #I86H6B

Signed-off-by: Lu Jingxiao <lujingxiao@huawei.com>
(cherry picked from commit 84fd54726a663f603700e4b565b065a62c268449)
2023-10-09 18:58:59 +08:00
flyflyflypeng
1dceeb1c20 docker: remove useless mount point dir
fix #I7UQ2Y

Signed-off-by: flyflyflypeng <jiangpengfei9@huawei.com>
(cherry picked from commit e5190694496f1b5fccb7b70e982fdf3fadb6e3cb)
2023-08-28 15:14:00 +08:00
chenjiankun
cd7070aebb docker: define a dummy hostname to use for local connections
For local communications (npipe://, unix://), the hostname is not used,
but we need valid and meaningful hostname.

The current code used the client's `addr` as hostname in some cases, which
could contain the path for the unix-socket (`/var/run/docker.sock`), which
gets rejected by go1.20.6 and go1.19.11 because of a security fix for
[CVE-2023-29406 ][1], which was implemented in  https://go.dev/issue/60374.

Prior versions go Go would clean the host header, and strip slashes in the
process, but go1.20.6 and go1.19.11 no longer do, and reject the host
header.

This patch introduces a `DummyHost` const, and uses this dummy host for
cases where we don't need an actual hostname.
2023-08-02 16:30:20 +08:00
chenjiankun
f69d70d2e2 docker: sync patches from master
(cherry picked from commit faa68fcbfa7bc543cdf70f004b82eed8431c7c77)
2023-07-13 11:26:08 +08:00
zhongjiawei
1beb1da2de docker:remove invalid libcgroup dependencies 2023-07-12 11:39:01 +08:00
zhongjiawei
a4edd1edf4 docker:thinpool full because docker daemon restart when docker pull 2023-06-09 11:06:25 +08:00
zhongjiawei
7a60984014 docker:fix CVE-2023-28840 CVE-2023-28841 CVE-2023-28842
(cherry picked from commit f021f5c385bf7dd11a892a128888f5998f754b24)
2023-04-06 20:00:21 +08:00
zhongjiawei
cf3b5bbff6 docker:sync some patches
(cherry picked from commit 5004ebff5b6cd0eeff1a8edaf8f59dea0f348021)
2023-03-30 10:02:42 +08:00
zhongjiawei
9c2234772a docker: try http for docker manifest insecure
(cherry picked from commit ff3bcc697b172784a8dacd637576cd932801399a)
2023-03-16 14:27:21 +08:00
JackChan8
2f5e04a8aa docker: fix container missing after restarting dockerd twice
fix #I6MJ4X

(cherry picked from commit 5ecf0ca3e74f004180222c8ec9ea3e240bf96d15)
2023-03-15 10:03:30 +08:00
Song Zhang
725d53a12b docker stats: fix 'panic: close of closed channel'
bugfix: https://gitee.com/src-openeuler/docker/issues/I6LNNW?from=project-issue

Signed-off-by: Song Zhang <zhangsong34@huawei.com>
(cherry picked from commit 8ed0a65d0b666a1f05e3b9c2e0f906859a1c4acb)
2023-03-10 16:39:45 +08:00
chenjiankun
8eacb70a4e docker: set freezer.state to Thawed to increase freeze chances
docker pause/unpause with parallel docker exec can lead to freezing
state, set freezer.state to Thawed to increase freeze chances

(cherry picked from commit b78a50c378d2ccef2254cf694991f4d52eec1fe9)
2023-02-17 16:52:06 +08:00
zhongjiawei
748628a918 docker:do not stop health check before sending signal
(cherry picked from commit 365eb0b1969d296e7e6894af9f913b3e24f81c21)
2022-12-01 16:28:49 +08:00
chenjiankun
ec922e1fed docker: using VERSION-vendor to record version
(cherry picked from commit 3cc77fa02d5a0efb77b71d4f506b44f209329b1d)
2022-11-24 14:31:40 +08:00
chenjiankun
025a686650 docker: fix dockerd core when release network
fix #I627ON

(cherry picked from commit 07ce32f65f1a3d9d812fe0fbb0276353472c035d)
2022-11-22 20:40:56 +08:00
chenjiankun
6c95d358c2 docker: cleanup netns file when stop docker daemon
fix #I5W2XY

(cherry picked from commit 6a3861c8c1449da33e37ccbd0f8a9327394dff6b)
2022-11-22 16:36:27 +08:00
chenjiankun
ffbd659b2d docker: add epoch for easy upgrade
(cherry picked from commit 7e4ff1bd426180bbdb05f55a57db9ec03034a257)
2022-09-21 11:29:00 +08:00
chenjiankun
d13823d8e0 docker: ensure layer digest folder removed if ls.driver.Remove fails
If image pull fails of context canceled, image layer will perform a
rollback operation. When image layer is released, the diff folder of layer
will be removed first, and then the digest folder will be removed.
If the diff folder fails to be removed, such as operation not permitted or
interrupted by others, both the digest folder and diff folder will remain
on the disk, this will cause image not be complete and not repairable.

So we should remove the digest folder first for image layers rollback
and ensure image can be re-pulled completely.

(cherry picked from commit 54c9d1260f3b7756794a8b8c13e0080831c29203)
2022-09-16 09:24:39 +08:00
chenjiankun
7fed8d00d0 docker: sync openEuler-22.03-LTS-Next with openEuler-22.03-LTS 2022-09-15 16:58:10 +08:00
xiadanni
06a66dabde docker:update seccomp whitelist to Linux 5.10 syscall list
Signed-off-by: xiadanni <xiadanni1@huawei.com>
2021-09-26 05:49:25 +08:00
xiadanni
7b18fd9382 docker:add clone3 to seccomp whitelist to fix curl failed in X86
After kernel upgrade to 5.10, clone3 is defined. But if clone3 is not
added to docker seccomp whitelist, clone3 calling will be rejected in
container, which causes some commands like curl returns error.

Signed-off-by: xiadanni <xiadanni1@huawei.com>
2021-09-08 13:00:11 +08:00
chenjiankun
6a44acb1d7 Enable debuginfo 2021-09-06 14:57:42 +08:00
xiadanni
1bae2e5ea3 docker:sync bugfix and fix CVE-2021-21284 2021-21285
1.fix execCommands leak in health-check
2.check containerd pid before kill it
3.fix CVE-2021-21284
4.fix CVE-2021-21285

Change-Id: I2fe1dd40281f1786ecc63ff19d416b113710e611
Signed-off-by: xiadanni <xiadanni1@huawei.com>
2021-03-18 15:40:53 +08:00
DCCooper
0f204a4fd6 docker:remove go-md2man build require
Signed-off-by: DCCooper <1866858@gmail.com>
2021-02-09 18:51:03 +08:00
jingrui
af6293703d docker: sync bugfix
Change-Id: I4dc92059d90415199fcd143d75cc68cfdb67c430
Signed-off-by: jingrui <jingrui@huawei.com>
2021-01-19 14:03:29 +08:00
liuzekun
294a810705 docker: sync patches from internal
Signed-off-by: liuzekun <liuzekun@huawei.com>
2020-11-28 09:37:25 +08:00
xiadanni
8cd4d200f6 docker: fix SOURCE0 addr
Signed-off-by: xiadanni <xiadanni1@huawei.com>
2020-09-14 14:46:45 +08:00
xiadanni1
07877c6fda docker: use git-commit to store commit ID
Change-Id: Id13ecdba61708f62595d6db593c670c304abf0bb
Signed-off-by: xiadanni1 <xiadanni1@huawei.com>
2020-06-16 02:07:26 +08:00