Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bbb7256

Browse files
committedJan 30, 2024·
use host network and only remove build and dangling imagest
1 parent a89f97b commit bbb7256

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed
 

‎templates/al2023/provisioners/install-nodeadm.sh

+9-4
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,23 @@ set -o pipefail
44
set -o nounset
55
set -o errexit
66

7+
BUILD_IMAGE=public.ecr.aws/eks-distro-build-tooling/golang:1.21
8+
79
sudo systemctl start containerd
810

911
sudo nerdctl run \
1012
--rm \
13+
--network host \
1114
--workdir /workdir \
1215
--volume $PROJECT_DIR:/workdir \
13-
public.ecr.aws/eks-distro-build-tooling/golang:1.21 \
16+
$BUILD_IMAGE \
1417
make build
1518

16-
# cleanup images and networks used for nerdctl
17-
sudo nerdctl image prune --all --force
18-
sudo nerdctl network rm $(sudo nerdctl network list -q)
19+
# cleanup build image and snapshots
20+
sudo nerdctl rmi \
21+
--force \
22+
$BUILD_IMAGE \
23+
$(sudo nerdctl images -a | grep none | awk '{ print $3 }')
1924

2025
# move the nodeadm binary into bin folder
2126
sudo chmod a+x $PROJECT_DIR/_bin/nodeadm

0 commit comments

Comments
 (0)
Please sign in to comment.