-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(general): container image based on Ubuntu (#2252)
- Loading branch information
Showing
1 changed file
with
24 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
FROM gcr.io/distroless/static:nonroot | ||
ARG TARGETARCH | ||
FROM ubuntu:latest | ||
|
||
# allow users to mount /app/config, /app/logs and /app/cache, /app/rclone respectively | ||
ENV KOPIA_CONFIG_PATH=/app/config/repository.config | ||
ENV KOPIA_LOG_DIR=/app/logs | ||
ENV KOPIA_CACHE_DIRECTORY=/app/cache | ||
ARG TARGETARCH | ||
|
||
# allow user to mount ~/.config/rclone to /app/rclone | ||
ENV RCLONE_CONFIG=/app/rclone/rclone.conf | ||
ENV DEBIAN_FRONTEND="noninteractive" \ | ||
TERM="xterm-256color" \ | ||
LC_ALL="C.UTF-8" \ | ||
KOPIA_CONFIG_PATH=/app/config/repository.config \ | ||
KOPIA_LOG_DIR=/app/logs \ | ||
KOPIA_CACHE_DIRECTORY=/app/cache \ | ||
RCLONE_CONFIG=/app/rclone/rclone.conf \ | ||
KOPIA_PERSIST_CREDENTIALS_ON_CONNECT=false \ | ||
KOPIA_CHECK_FOR_UPDATES=false | ||
|
||
# this requires repository password to be passed via KOPIA_PASSWORD environment. | ||
ENV KOPIA_PERSIST_CREDENTIALS_ON_CONNECT=false | ||
ENV KOPIA_CHECK_FOR_UPDATES=false | ||
|
||
# this creates directories writable by the current user | ||
WORKDIR /app | ||
|
||
ENV PATH=/bin | ||
|
||
COPY bin-${TARGETARCH}/kopia . | ||
COPY bin-${TARGETARCH}/rclone /bin/rclone | ||
|
||
ENTRYPOINT ["/app/kopia"] | ||
COPY bin-${TARGETARCH}/kopia . | ||
COPY bin-${TARGETARCH}/rclone /bin/rclone | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y --with-new-pkgs && \ | ||
apt-get install -y --no-install-recommends fuse3 && \ | ||
apt-get clean autoclean -y && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /var/lib/apt/* /var/lib/cache/* /var/lib/log/* \ | ||
/var/tmp/* /usr/share/doc/ /usr/share/man/ /usr/share/locale/ \ | ||
/root/.cache /root/.local /root/.gnupg /root/.config /tmp/* | ||
|
||
ENTRYPOINT ["/app/kopia"] |