Skip to content

Commit 162cb69

Browse files
fix: replace bolter with bbolt (#48)
1 parent f561fab commit 162cb69

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

Dockerfile

+4-5
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ RUN CGO_ENABLED=0 go build -o /usr/local/bin/dind-cleaner ./cmd && \
1414
chmod +x /usr/local/bin/dind-cleaner && \
1515
rm -rf /go/*
1616

17-
# bolter
18-
FROM golang:1.21-alpine3.18 AS bolter
19-
RUN apk add git
20-
RUN go install github.com/hasit/[email protected]
17+
# bbolt
18+
FROM golang:1.21-alpine3.18 AS bbolt
19+
RUN go install go.etcd.io/bbolt/cmd/bbolt@latest
2120

2221
# node-exporter
2322
FROM quay.io/prometheus/node-exporter:v1.6.1 AS node-exporter
@@ -41,7 +40,7 @@ ENV DOCKERD_ROOTLESS_ROOTLESSKIT_NET=slirp4netns
4140

4241
COPY --from=node-exporter /bin/node_exporter /bin/
4342
COPY --from=cleaner /usr/local/bin/dind-cleaner /bin/
44-
COPY --from=bolter /go/bin/bolter /bin/
43+
COPY --from=bbolt /go/bin/bbolt /bin/
4544

4645
WORKDIR /dind
4746
ADD . /dind

run.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ sigterm_trap(){
5555
echo "Starting Cleaner"
5656
${DIR}/cleaner/docker-clean.sh
5757
fi
58-
58+
5959
echo "Cleaning old events files"
6060
find ${DOCKER_EVENTS_DIR} -type f -mtime +10 -exec rm -fv {} \;
6161

@@ -152,7 +152,7 @@ do
152152
DOCKERD_PID=$(cat ${DOCKERD_PID_FILE})
153153
echo " Waiting for dockerd pid ${DOCKERD_PID_FILE} to exit ..."
154154
CNT=0
155-
pkill dockerd
155+
pkill dockerd
156156
while pgrep -l dockerd
157157
do
158158
[[ -n "${SIGTERM}" ]] && break 2
@@ -173,7 +173,7 @@ do
173173
if [[ -f ${CONTEINERD_DB} ]]; then
174174
echo "Checking if another dockerd is running on same ${DOCKERD_DATA_ROOT} boltdb $CONTEINERD_DB is locked"
175175
CNT=0
176-
while ! bolter --file ${CONTEINERD_DB}
176+
while ! bbolt check ${CONTEINERD_DB}
177177
do
178178
[[ -n "${SIGTERM}" ]] && break 2
179179
echo "$(date) - Waiting for containerd boltd ${CONTEINERD_DB}"
@@ -184,7 +184,7 @@ do
184184
fi
185185
sleep 1
186186
done
187-
else
187+
else
188188
echo "containerd db is not locked"
189189
fi
190190

service.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 1.28.0
1+
version: 1.28.1

0 commit comments

Comments
 (0)