Skip to content

Commit 595e1df

Browse files
committed
use host network and only remove build and dangling images
1 parent a89f97b commit 595e1df

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

templates/al2023/provisioners/install-nodeadm.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ 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 --force $BUILD_IMAGE
21+
sudo nerdctl image prune --force
1922

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

0 commit comments

Comments
 (0)