mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
* Due to the significant issues with Debian and it's default version of 'curl' ensure that the Debian Docker image will update 'curl' from the relevant backports repository to avoid these issues
46 lines
1.6 KiB
Docker
46 lines
1.6 KiB
Docker
# -*-Dockerfile-*-
|
|
|
|
ARG DEBIAN_VERSION=stable
|
|
|
|
FROM debian:${DEBIAN_VERSION} AS builder-onedrive
|
|
|
|
# Add backports repository and update before initial DEBIAN_FRONTEND installation
|
|
RUN apt-get clean \
|
|
&& echo "deb http://deb.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/debian-12-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 pkg-config git ldc \
|
|
# Install|update curl from backports
|
|
&& apt-get install -t bookworm-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
|
|
|
|
# Add backports repository and update after DEBIAN_FRONTEND installation
|
|
RUN apt-get clean \
|
|
&& echo "deb http://deb.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/debian-12-backports.list \
|
|
&& apt-get update \
|
|
&& apt-get upgrade -y \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gosu libsqlite3-0 ca-certificates libphobos2-ldc-shared100 \
|
|
# Install|update curl from backports
|
|
&& apt-get install -t bookworm-backports -y curl \
|
|
&& 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
|
|
|
|
COPY --from=builder-onedrive /usr/local/bin/onedrive /usr/local/bin/
|
|
|
|
COPY contrib/docker/entrypoint.sh /
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|