Skip to content

Commit

Permalink
Merge pull request #53 from theohbrothers/fix/fix-rare-error-rm-can-t…
Browse files Browse the repository at this point in the history
…-remove-root-.gnupg-s.x-during-docker-build

Fix: Fix rare error `rm: can't remove '/root/.gnupg/S.*` during docker build
  • Loading branch information
leojonathanoh authored Oct 14, 2023
2 parents 715d343 + f427c54 commit 7aaa65d
Show file tree
Hide file tree
Showing 18 changed files with 90 additions and 18 deletions.
6 changes: 5 additions & 1 deletion generate/templates/Dockerfile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ RUN set -eux; \
rm -fv "$FILE"; \
rm -fv "$FILE.sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;
VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.0.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.0.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.0.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.0.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.0.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.0.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.0.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.0.8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.0.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.1.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.1.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.1.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.1.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.1.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.1.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.1.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down
6 changes: 5 additions & 1 deletion variants/3.1.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ RUN set -eux; \
rm -fv ""; \
rm -fv ".sig"; \
apk del gnupg gpg-agent dirmngr; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
killall dirmngr; \
killall gpg-agent; \
# Fix error: rm: can't remove '/root/.gnupg/S.gpg-agent.extra': No such file or directory
while ls /root/.gnupg/S.* > /dev/null; do \
echo "Waiting for gpg sockets to be removed"; \
sleep 1; \
done; \
rm -rf /root/.gnupg;

VOLUME /data
Expand Down

0 comments on commit 7aaa65d

Please sign in to comment.