Skip to content

Commit

Permalink
fix: replace bolter with bbolt (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhail-klimko authored Sep 15, 2023
1 parent f561fab commit 162cb69
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ RUN CGO_ENABLED=0 go build -o /usr/local/bin/dind-cleaner ./cmd && \
chmod +x /usr/local/bin/dind-cleaner && \
rm -rf /go/*

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

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

COPY --from=node-exporter /bin/node_exporter /bin/
COPY --from=cleaner /usr/local/bin/dind-cleaner /bin/
COPY --from=bolter /go/bin/bolter /bin/
COPY --from=bbolt /go/bin/bbolt /bin/

WORKDIR /dind
ADD . /dind
Expand Down
8 changes: 4 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ sigterm_trap(){
echo "Starting Cleaner"
${DIR}/cleaner/docker-clean.sh
fi

echo "Cleaning old events files"
find ${DOCKER_EVENTS_DIR} -type f -mtime +10 -exec rm -fv {} \;

Expand Down Expand Up @@ -152,7 +152,7 @@ do
DOCKERD_PID=$(cat ${DOCKERD_PID_FILE})
echo " Waiting for dockerd pid ${DOCKERD_PID_FILE} to exit ..."
CNT=0
pkill dockerd
pkill dockerd
while pgrep -l dockerd
do
[[ -n "${SIGTERM}" ]] && break 2
Expand All @@ -173,7 +173,7 @@ do
if [[ -f ${CONTEINERD_DB} ]]; then
echo "Checking if another dockerd is running on same ${DOCKERD_DATA_ROOT} boltdb $CONTEINERD_DB is locked"
CNT=0
while ! bolter --file ${CONTEINERD_DB}
while ! bbolt check ${CONTEINERD_DB}
do
[[ -n "${SIGTERM}" ]] && break 2
echo "$(date) - Waiting for containerd boltd ${CONTEINERD_DB}"
Expand All @@ -184,7 +184,7 @@ do
fi
sleep 1
done
else
else
echo "containerd db is not locked"
fi

Expand Down
2 changes: 1 addition & 1 deletion service.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 1.28.0
version: 1.28.1

0 comments on commit 162cb69

Please sign in to comment.