Skip to content

Commit 883e04a

Browse files
committed
debug docker res config-22
1 parent a991ddc commit 883e04a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/mcad-CI.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212
steps:
1313
- name: run docker resource config
1414
run: |
15-
sudo touch $PWD/slice.conf
16-
cat <<EOF > $PWD/slice.conf
15+
sudo touch /etc/systemd/system/docker_limit.slice
16+
cat <<EOF > /etc/systemd/system/docker_limit.slice
1717
[Unit]
1818
Description=Slice that limits docker resources
1919
Before=slices.target
2020
[Slice]
2121
CPUAccounting=true
2222
CPUQuota=50%
2323
EOF
24-
sudo systemctl start $PWD/slice.conf
25-
new_content='{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "cgroup-parent": "/slice.conf" }'
24+
sudo systemctl start /etc/systemd/system/docker_limit.slice
25+
new_content='{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "cgroup-parent": "/docker_limit.slice" }'
2626
sudo sed -i 's|{ "exec-opts": \["native.cgroupdriver=cgroupfs"\], "cgroup-parent": "/actions_job" }|'"$new_content"'|' /etc/docker/daemon.json
2727
cat /etc/docker/daemon.json
2828
sudo systemctl restart docker

0 commit comments

Comments
 (0)