mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
Initial import
This commit is contained in:
commit
2295a33590
884 changed files with 93939 additions and 0 deletions
28
Containers/watchtower/Dockerfile
Normal file
28
Containers/watchtower/Dockerfile
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# From https://github.com/containrrr/watchtower/blob/main/dockerfiles/Dockerfile.self-contained
|
||||
FROM containrrr/watchtower:latest as watchtower
|
||||
|
||||
FROM debian:bullseye
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
openssl \
|
||||
; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=watchtower /watchtower /
|
||||
|
||||
COPY start.sh /
|
||||
RUN chmod +x /start.sh
|
||||
|
||||
# Give root a random password
|
||||
RUN echo "root:$(openssl rand -base64 12)" | chpasswd
|
||||
|
||||
# add docker group
|
||||
RUN groupadd -g 998 docker && \
|
||||
usermod -aG docker nobody
|
||||
|
||||
USER nobody
|
||||
ENTRYPOINT ["/start.sh"]
|
||||
19
Containers/watchtower/start.sh
Normal file
19
Containers/watchtower/start.sh
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Check if socket is available and readable
|
||||
if ! [ -a "/var/run/docker.sock" ]; then
|
||||
echo "Docker socket is not available. Cannot continue."
|
||||
exit 1
|
||||
elif ! [ -r "/var/run/docker.sock" ]; then
|
||||
echo "Docker socket is not readable by the nobody user. Cannot continue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$CONTAINER_TO_UPDATE" ]; then
|
||||
exec /watchtower --cleanup --run-once "$CONTAINER_TO_UPDATE"
|
||||
else
|
||||
echo "'CONTAINER_TO_UPDATE' is not set. Cannot update anything."
|
||||
fi
|
||||
|
||||
|
||||
exec "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue