abraunegg-onedrive/contrib/docker/Dockerfile-debian
abraunegg 0b65d073eb
Update Dockerfiles December 2025 (#3565)
* Update Dockerfiles December 2025:
  - Update to Fedora 43 and GO 1.23
  - Update to Alpine 3.23 and GO 1.25
  - Update to Debian 13 and support relevant time64 package changes
2025-12-12 15:18:05 +11:00

55 lines
2.1 KiB
Docker

# -*-Dockerfile-*-
ARG DEBIAN_VERSION=trixie
FROM debian:${DEBIAN_VERSION} AS builder-onedrive
ARG DEBIAN_VERSION
# Add backports repository and update before initial DEBIAN_FRONTEND installation
RUN apt-get clean \
&& echo "deb http://deb.debian.org/debian ${DEBIAN_VERSION}-backports main" > /etc/apt/sources.list.d/debian-${DEBIAN_VERSION}-backports.list \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends build-essential curl ca-certificates libcurl4-openssl-dev libsqlite3-dev libxml2-dev libdbus-1-dev pkg-config git ldc \
# Install|update curl from backports
&& apt-get install -t ${DEBIAN_VERSION}-backports -y curl \
&& rm -rf /var/lib/apt/lists/*
COPY . /usr/src/onedrive
WORKDIR /usr/src/onedrive
RUN ./configure --enable-debug\
&& make clean \
&& make \
&& make install
FROM debian:${DEBIAN_VERSION}-slim
ARG DEBIAN_VERSION
# Add backports repository and update after DEBIAN_FRONTEND installation
RUN apt-get clean \
&& echo "deb http://deb.debian.org/debian ${DEBIAN_VERSION}-backports main" > /etc/apt/sources.list.d/debian-${DEBIAN_VERSION}-backports.list \
&& apt-get update \
&& apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libsqlite3-0 ca-certificates libphobos2-ldc-shared110 libdbus-1-3 \
# Install|update curl and libcurl4t64 from backports to get the latest version
&& apt-get install -t ${DEBIAN_VERSION}-backports -y curl libcurl4t64 \
&& rm -rf /var/lib/apt/lists/* \
# Fix bug with ssl on armhf: https://serverfault.com/a/1045189
&& /usr/bin/c_rehash \
&& mkdir -p /onedrive/conf /onedrive/data
# Install gosu v1.17 from trusted upstream source (built against Go 1.18.2)
RUN set -eux; \
arch="$(dpkg --print-architecture)"; \
curl -fsSL -o /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.17/gosu-${arch}"; \
chmod +x /usr/local/bin/gosu; \
gosu nobody true
COPY --from=builder-onedrive /usr/local/bin/onedrive /usr/local/bin/
COPY contrib/docker/entrypoint.sh /
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]