docker-rclone-mount
docker-rclone-mount copied to clipboard
Overlay s6 is out of date, here is a docker file that fixes it. They no longer use gz but xz
Overlay s6 is out of date, here is a docker file that fixes it. They no longer use gz but xz
FROM alpine:latest
# Set a maintainer using LABEL (MAINTAINER is deprecated)
LABEL maintainer="tynor88 <[email protected]>"
# Global environment settings
ENV RCLONE_DOWNLOAD_VERSION="current"
ENV PLATFORM_ARCH="amd64"
# s6 environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
ENV S6_KEEP_ENV=1
# Install necessary packages
RUN apk update && apk add --no-cache \
ca-certificates \
bash \
fuse && \
sed -i 's/#user_allow_other/user_allow_other/' /etc/fuse.conf
# Install build packages
RUN apk add --no-cache --virtual=build-dependencies \
wget \
curl \
unzip
# Add s6 overlay
RUN curl -o /tmp/s6-overlay.tar.xz -L \
"https://github.com/just-containers/s6-overlay/releases/download/v3.2.0.2/s6-overlay-i686.tar.xz"
RUN tar xf /tmp/s6-overlay.tar.xz -C /
# Install rclone
RUN wget -q -O /tmp/rclone.zip \
"http://downloads.rclone.org/rclone-${RCLONE_DOWNLOAD_VERSION}-linux-amd64.zip" && \
unzip /tmp/rclone.zip -d /tmp && \
mv /tmp/rclone-*-linux-amd64/rclone /usr/bin
# Install additional packages
RUN apk add --no-cache --repository http://nl.alpinelinux.org/alpine/edge/community shadow
# Cleanup unnecessary files
RUN apk del --purge build-dependencies && \
rm -rf /tmp/* /var/tmp/* /var/cache/apk/*
# Create abc user and directories
RUN groupmod -g 1000 users && \
useradd -u 911 -U -d /config -s /bin/false abc && \
usermod -G users abc && \
mkdir -p /config /data /tmpdata /root/.cache/rclone/cache-backend
# Add local files
COPY . /app
RUN apk update && apk add --no-cache \
bash
# Define volumes and entrypoint
VOLUME ["/config"]
ENTRYPOINT ["/bin/sh"]
Can you make a PR?
I would but I am too far behind.
I gambled today thinking i could find a way to mount a remote directory in an un privledge docker container, and i got wrecked.
Btw, your readme makes it seem like the extra parameters are only necessary to expose the rclone mount outside of the container.
Through much blood, I do not believe this is correct at all. You must have privileged or fuse won't be available and therefore all mounts will fail.