Skip to content

Commit

Permalink
Update Debian Dockerfile to use 'curl' from backports (#2831)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
abraunegg authored Sep 19, 2024
1 parent a206180 commit fb35508
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
12 changes: 11 additions & 1 deletion contrib/docker/Dockerfile-debian
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ 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
Expand All @@ -19,10 +25,14 @@ RUN ./configure --enable-debug\

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 libcurl4 libsqlite3-0 ca-certificates libphobos2-ldc-shared100 \
&& 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 \
Expand Down
6 changes: 5 additions & 1 deletion docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,14 @@ docker container run -e ONEDRIVE_RESYNC=1 -v onedrive_conf:/onedrive/conf -v "${
```bash
docker container run -e ONEDRIVE_RESYNC=1 -e ONEDRIVE_VERBOSE=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:edge
```
**Perform a --logout and re-authenticate:**
**Perform a --logout:**
```bash
docker container run -it -e ONEDRIVE_LOGOUT=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:edge
```
**Perform a --logout and re-authenticate:**
```bash
docker container run -it -e ONEDRIVE_REAUTH=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:edge
```

## Building a custom Docker image

Expand Down
6 changes: 5 additions & 1 deletion docs/podman.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,14 @@ podman run -e ONEDRIVE_RESYNC=1 -v onedrive_conf:/onedrive/conf:U,Z -v "${ONEDRI
```bash
podman run -e ONEDRIVE_RESYNC=1 -e ONEDRIVE_VERBOSE=1 -v onedrive_conf:/onedrive/conf:U,Z -v "${ONEDRIVE_DATA_DIR}:/onedrive/data:U,Z" --user "${ONEDRIVE_UID}:${ONEDRIVE_GID}" driveone/onedrive:edge
```
**Perform a --logout and re-authenticate:**
**Perform a --logout:**
```bash
podman run -it -e ONEDRIVE_LOGOUT=1 -v onedrive_conf:/onedrive/conf:U,Z -v "${ONEDRIVE_DATA_DIR}:/onedrive/data:U,Z" --user "${ONEDRIVE_UID}:${ONEDRIVE_GID}" driveone/onedrive:edge
```
**Perform a --logout and re-authenticate:**
```bash
podman run -it -e ONEDRIVE_REAUTH=1 -v onedrive_conf:/onedrive/conf:U,Z -v "${ONEDRIVE_DATA_DIR}:/onedrive/data:U,Z" --user "${ONEDRIVE_UID}:${ONEDRIVE_GID}" driveone/onedrive:edge
```

## Building a custom Podman image
You can also build your own image instead of pulling the one from [hub.docker.com](https://hub.docker.com/r/driveone/onedrive):
Expand Down

0 comments on commit fb35508

Please sign in to comment.