Skip to content

Commit

Permalink
fix: replace bolter with bbolt (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhail-klimko authored Sep 15, 2023
1 parent f8a8615 commit c1dc345
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +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 go install github.com/hasit/bolter@v0.0.0-20210331045447-e1283cecdb7b
# 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 @@ -32,7 +32,7 @@ RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.11/main' >> /etc/apk/repositor

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
10 changes: 5 additions & 5 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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 @@ -100,7 +100,7 @@ fi
echo "$(date) - Starting dockerd with /etc/docker/daemon.json: "
cat /etc/docker/daemon.json

# Docker registry self-signed Certs - workaround for problem where kubernetes cannot mount
# Docker registry self-signed Certs - workaround for problem where kubernetes cannot mount
for cc in $(find /etc/docker/certs.d -type d -maxdepth 1)
do
echo "Trying to process Registery Self-Signed certs dir $cc "
Expand Down Expand Up @@ -150,7 +150,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 @@ -171,7 +171,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 @@ -182,7 +182,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 c1dc345

Please sign in to comment.