Skip to content

Commit

Permalink
feat(general): container image based on Ubuntu (#2252)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanik39 committed Jul 31, 2022
1 parent 6160ee5 commit 93ede28
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions tools/docker/Dockerfile
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"]

0 comments on commit 93ede28

Please sign in to comment.