docker-brudi-rclone/Dockerfile

48 lines
1.4 KiB
Docker
Raw Normal View History

2024-07-06 09:42:26 +00:00
# # Add build-base package for compiling source code
# RUN apk add --no-cache --upgrade build-base
2024-07-06 09:38:42 +00:00
2024-07-06 09:42:26 +00:00
# # Clone the brudi source code from GitHub
# RUN git clone https://github.com/mittwald/brudi.git /tmp/brudi
2024-07-06 09:38:42 +00:00
2024-07-06 09:42:26 +00:00
# # Build brudi from source for arm architecture
# WORKDIR /tmp/brudi
# RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -o /usr/local/bin/brudi
2024-07-06 09:38:42 +00:00
2024-07-06 09:42:26 +00:00
# # Clean up the temporary directory
# RUN rm -rf /tmp/brudi
2024-07-06 09:38:42 +00:00
2024-02-15 02:01:10 +00:00
FROM postgres:16.2-alpine3.19
2023-12-19 00:46:54 +00:00
2024-02-13 23:39:07 +00:00
LABEL maintainer="s83 <https://github.com/s83>"
2023-12-25 18:29:13 +00:00
ENV BRUDI_USER="brudi" \
BRUDI_GID="1000" \
BRUDI_UID="1000"
COPY --from=quay.io/mittwald/brudi:0.1 /usr/local/bin/brudi /usr/local/bin/brudi
2024-02-13 23:38:15 +00:00
COPY --from=restic/restic:0.16.4 /usr/bin/restic /usr/local/bin/restic
2024-02-15 02:03:05 +00:00
COPY --from=redis:7.2.4-alpine3.19 /usr/local/bin/redis-cli /usr/local/bin/redis-cli
2023-12-25 18:29:13 +00:00
RUN apk add --no-cache --upgrade \
mysql-client \
rclone \
curl \
&& \
addgroup \
-S "${BRUDI_USER}" \
-g "${BRUDI_GID}" \
&& \
adduser \
-u "${BRUDI_UID}" \
-S \
-G "${BRUDI_USER}" \
2023-12-25 19:03:15 +00:00
"${BRUDI_USER}" \
&& mkdir -p /home/${BRUDI_USER}/.config/rclone \
&& touch /home/${BRUDI_USER}/.config/rclone/rclone.conf
2023-12-25 18:29:13 +00:00
USER ${BRUDI_USER}
WORKDIR /home/${BRUDI_USER}
ENTRYPOINT ["brudi"]
2024-07-06 09:38:42 +00:00