added the official docker cli
All checks were successful
Build and Push Docker Image / build (push) Successful in 39s
All checks were successful
Build and Push Docker Image / build (push) Successful in 39s
-switched to user 1000 for security. -added user to docker group -properly mounted btrfs drive on host allows users to create snapshots
This commit is contained in:
42
Dockerfile
42
Dockerfile
@@ -1,34 +1,48 @@
|
||||
# Use LinuxServer.io Duplicati base
|
||||
FROM linuxserver/duplicati:2.1.0
|
||||
|
||||
# Install Docker CLI, bash, python3
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
# Install Docker CLI, bash, python3, btrfs support and all the app directories
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
lsb-release \
|
||||
bash \
|
||||
python3 \
|
||||
python3-pip \
|
||||
docker.io \
|
||||
btrfs-progs \
|
||||
ca-certificates curl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
&& mkdir -p /etc/apt/keyrings \
|
||||
&& curl -fsSL "https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg" \
|
||||
| gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
|
||||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
|
||||
https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
|
||||
$(lsb_release -cs) stable" \
|
||||
| tee /etc/apt/sources.list.d/docker.list > /dev/null \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
docker-ce-cli \
|
||||
&& groupadd -f docker \
|
||||
&& usermod -aG docker abc \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& mkdir -p /usr/local/bin /config /etc/services.d/backupbot
|
||||
|
||||
# Create directories for backup scripts and logs
|
||||
RUN mkdir -p /usr/local/bin /config/log /config/web /etc/services.d/backupbot
|
||||
|
||||
# Copy backup script
|
||||
# Copy the backup script
|
||||
COPY backup.sh /usr/local/bin/backup.sh
|
||||
RUN chmod +x /usr/local/bin/backup.sh
|
||||
|
||||
# Copy the environment variables for the config
|
||||
COPY backupbot.env /defaults/backupbot.env
|
||||
# Copy the environment variables for backupbot
|
||||
COPY backupbot.conf /defaults/backupbot.conf
|
||||
RUN chown www-data:www-data /defaults/backupbot.conf \
|
||||
&& chmod 644 /defaults/backupbot.conf
|
||||
|
||||
# Copy s6 service for backupbot
|
||||
COPY services/backupbot/run /etc/services.d/backupbot/run
|
||||
RUN chmod +x /etc/services.d/backupbot/run
|
||||
|
||||
# Copy web frontend
|
||||
COPY web /defaults/web
|
||||
RUN chmod +x /defaults/web/cgi-bin/backupbot.cgi
|
||||
COPY web /app
|
||||
RUN chmod +x /app/cgi-bin/backupbot.cgi
|
||||
# Expose web frontend port
|
||||
EXPOSE 8080
|
||||
|
||||
|
||||
Reference in New Issue
Block a user