Commit graph

72 commits

Author SHA1 Message Date
abraunegg
20e70cd062
Fix Bug #3601: Fix Docker entrypoint handling for non-root --user execution (#3602)
* Fix Docker entrypoint handling for non-root --user execution

This change updates the Docker entrypoint.sh to correctly support containers started with a numeric UID/GID via --user or user: (Docker Compose).

Previously, the entrypoint unconditionally attempted user and group management (useradd, groupadd, usermod) before checking whether the container was running as root. When the container was started as a non-root user, this resulted in immediate startup failures due to insufficient privileges.

The updated logic now:

* Detects whether the container is started as root or non-root
* Skips all user/group creation and ownership changes when running as non-root
* Treats --user / user: as authoritative when provided
* Preserves existing behaviour when the container is started as root (including optional privilege drop via gosu)
* Ensures ONEDRIVE_RUNAS_ROOT is only honoured when the container is actually running as root

This makes the container compatible with:

* Numeric UID/GID execution
* NFS-backed volumes where the user does not exist on the host
* Read-only bind mounts for upload-only scenarios

No changes are made to the OneDrive client itself; this update strictly improves container startup behaviour and correctness.
2026-01-11 07:12:58 +11:00
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
abraunegg
1e48e42363
Implement FR #3491: Add ONEDRIVE_THREADS Docker option (#3494)
* Add Docker environment variable 'ONEDRIVE_THREADS' to control the value for the number of worker threads used for parallel upload and download operations.
2025-10-28 05:55:08 +11:00
abraunegg
8711b9bc92
Update Debian Docker Build (#3446)
* Update Debian Docker Build - force to 'bookworm' for Debian 12
2025-09-23 08:14:09 +10:00
abraunegg
298e8896b3
Update Debian Dockerfile to use upstream gosu (#3402)
* Update Debian Dockerfile to use upstream gosu version rather than Debian provided version
2025-08-01 12:08:44 +10:00
abraunegg
ea7c3abd2d
Fix Bug #3355: Fix that long running big upload (250GB+) fails because of an expired access token (#3361)
* Revert back to v2.5.5 performSessionFileUpload() and apply minimal change for upload session offset handling to prevent desynchronisation on large files
* Add specific 403 handler for when the upload session URL itself expires
* Add 'file_fragment_size'
* Clean up debug logging output
* Add 'tempauth' to spelling words
* Update documentation URL's
* Ensure that on each fragment upload, whilst the application is using the 'tempauth' for session upload, the global OAuth2 token needs to be checked for validity and refreshed if required
* Add limit check for 'file_fragment_size' option
* Add to default 'config' file
* Update documentation for 'file_fragment_size'
* Add 'file_fragment_size' to --display-config output
* Add --file-fragment-size option to enable use via Docker option
* Add to manpage
* Update Docker entrypoint
* Update Docker | Podman documentation
* Update logging output to include connection method to URL
* Update Upload Session URL expiry update to include UTC and LocalTime values
* Update comment which was dropped / missed
* Clarify that this is the OAuth2 Access Token
* Clarify that the expiry timestamp is localTime
* Update PR with dynamic use of fragment size if fileSize > 100MiB
* Enforce multiple 320KiB for fragment size to align to Microsoft documentation
* Fix Docker entrypoint and confirm working for ONEDRIVE_FILE_FRAGMENT_SIZE
* Change 'defaultMaxFileFragmentSize' to 60
* Revise fragmentSize calculation to be as close to 60 MiB as possible without breaching Microsoft documented threshold
2025-07-03 17:21:16 +10:00
abraunegg
1725f88673
Fix Bug #3302: Add dbus libs to Docker base build (#3303)
* Add dbus libs to Docker base build
* Update readme with wording updates/tweaks
2025-05-29 06:01:30 +10:00
abraunegg
61e5a1edb6
Implement FR #3209: Add native support for authentication via Intune dbus interface (#3274)
* Adds support for calling `acquireTokenInteractively` and `acquireTokenSilently` via D-Bus
* Parses and handles the full `brokerTokenResponse` object returned by the Intune broker
* Stores and reuses `account` data to enable silent token refresh without repeated interactive authentication
* Ensures the access token and its expiry time are properly calculated and stored for consistent token management
* Fallback to interactive authentication is triggered if silent authentication fails
2025-05-26 17:14:50 +10:00
Yuan Liu
a95bd83604
Fix args printing in dockerfile entrypoint (#3248)
* Fix args printing in dockerfile entrypoint
2025-04-27 14:14:00 +10:00
abraunegg
5b41409ad6
Update Fedora Docker image to Fedora 42 (#3231)
* Update Fedora Docker image to Fedora 42
2025-04-23 06:47:31 +10:00
abraunegg
ac8cf36046
Update Docker OS versions (#3150)
* Update Docker OS versions March 2025
  * Use Fedora 41
  * Use Alpine 3.21
2025-03-16 07:38:04 +11:00
Pieter Scheffers
c7f1b7f407
feat: optionally use standalone mode for syncing using Docker container (#3018)
* feat: optionally use standalone mode for syncing using Docker container

* Update podman.md
* Update podman.md

---------

Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2024-11-29 06:29:30 +11:00
abraunegg
92fdea0c8f
Update Dockerfile-alpine - revert to Alpine 3.19 (#2956)
* Update Dockerfile-alpine - revert to Alpine 3.19 due to LDC compiler (ldc (1.33.0-r0)) throwing a SIGINT on Alpine 3.20. The same compiler ldc (1.33.0-r0) has zero run-time issue on Alpine 3.19.
2024-11-08 09:26:36 +11:00
abraunegg
4793d83835 Revert "Update Dockerfile-alpine (#2955)"
This reverts commit 9a4e6860c3.
2024-11-08 07:59:22 +11:00
abraunegg
9a4e6860c3
Update Dockerfile-alpine (#2955)
* Add changes suggested by @DevDorrejo for building the Alpine containers using DMD rather than LDC as suggested in #2951
2024-11-08 07:56:48 +11:00
abraunegg
5cf8667308 Update Dockerfile-debian
* Fix that libcurl4 does not get applied despite being pulled in. Explicitly install it from Debian 12 Backports
2024-10-25 10:44:01 +11:00
abraunegg
3ad139aa25
Implement Docker ENV variable for --cleanup-local-files (#2868)
* Implement Docker ENV variable for --cleanup-local-files
2024-10-02 18:08:08 +10:00
abraunegg
fb35508ad6
Update Debian Dockerfile to use 'curl' from backports (#2831)
* 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
2024-09-20 07:25:34 +10:00
abraunegg
49569e3d00
Add --enable-debug to Docker files (#2811)
* Add --enable-debug to Docker files when building client application so that if the client crashes in any way, there is some meaningful crash data available to diagnose and assist in fixing the actual issue encountered.
2024-09-18 08:01:07 +10:00
abraunegg
a3522fda30
OneDrive Client for Linux v2.5.0 (#2805)
OneDrive Client for Linux v2.5.0

---------

Signed-off-by: Thomas Staudinger <Staudi.Kaos@gmail.com>
Co-authored-by: JC-comp <147694781+JC-comp@users.noreply.github.com>
Co-authored-by: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com>
Co-authored-by: Pierrick Caillon <megamisan@users.noreply.github.com>
Co-authored-by: Pierrick Caillon <pierrick.caillon@megami.fr>
Co-authored-by: Thomas Staudinger <Staudi.Kaos@gmail.com>
Co-authored-by: Yuan Liu <Lyncredible@users.noreply.github.com>
2024-09-16 11:14:46 +10:00
Gonçalo Martins
99271a45de
Add --no-remote-delete flag to docker entrypoint (#2453)
* Add --no-remote-delete flag to docker entrypoint

---------

Co-authored-by: Gonçalo Martins <g.martins@revolut.com>
Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2023-07-24 10:41:06 +10:00
abraunegg
f5edb8b394
Update Docker files June 2023 (#2438)
* Update Docker Files June 2023 and Documentation
2023-06-21 12:59:46 +10:00
abraunegg
77684452aa
Update Docker gosu version to 1.16 to resolve current vulnerabilities (#2386)
* Update gosu version to 1.16
2023-04-18 14:35:24 +10:00
abraunegg
4e5a32c210
Update to Fedora Docker file to use Fedora 37 to resolve current vulnerabilities (#2383)
* Update to use Docker build to use Fedora 37
* Update golang to 1.20
2023-04-18 12:40:05 +10:00
abraunegg
56149c285c
Update to Alpine Docker file to resolve current vulnerabilities (#2384)
* Update to Alpine Docker file to resolve current vulnerabilities
2023-04-18 08:54:10 +10:00
abraunegg
ae33616d0b
Update to Debian Docker file to resolve current vulnerabilities (#2385)
* Update to Debian Docker file to resolve current vulnerabilities
2023-04-18 07:34:48 +10:00
NigelVanHattum
b3829c1ef3
Add single directory sync to docker (#2309)
* Add single directory sync to docker

---------

Co-authored-by: Hattum van <Nigel.van.Hattum@rabobank.nl>
Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2023-02-24 06:30:00 +11:00
abraunegg
54e1ab0c16
Update Alpine Dockerfile to use Alpine 3.17 (#2277)
* Update Alpine Dockerfile to use Alpine 3.17
* Update golang version to use Golang 1.19
2022-12-30 12:07:29 +11:00
abraunegg
cc3b83afcb
Implement --display-running-config (#2064)
* Implement --display-running-config to display the running configuration as used at application startup
* Add ONEDRIVE_DISPLAY_CONFIG variable to control --display-running-config in Docker environments
2022-08-06 06:25:58 +10:00
Sebastien Badia
0ab2955bd7
Various little spelling fixes (check with lintian during Debian packaging) (#2027)
* contrib: remove bash hashbang from completion

This file starts with the #! sequence that marks interpreted scripts, but
it is a bash completion script that is merely intended to be sourced.

* src: spelling error (Attemtping => Attempting)

* src: spelling error (reponse => response)

* src: spelling error (sucessfully => successfully)
2022-07-02 05:14:50 +10:00
Pavel Pivovarov
c7eabab27b
Added ONEDRIVE_UPLOADONLY flag for Docker (#2002)
* Added ONEDRIVE_UPLOADONLY environment variable
2022-06-11 07:55:08 +10:00
abraunegg
62701e5ef3
Update Dockerfile to use Fedora 36 (#1976)
* Update Dockerfile to use Fedora 36 as it was released May 10, 2022
2022-06-01 06:26:38 +10:00
ticteam
767352686f
Add libphobos2-ldc-shared94 to Dockerfile-debian (#1975)
* Add libphobos2-ldc-shared94 to Dockerfile-debian
2022-06-01 05:45:06 +10:00
abraunegg
ff8d137057
Update minimum compiler versions to dmd-2.088.0 and ldc-1.18.0 (#1972)
* Update to dmd-2.088.0 and ldc-1.18.0
* Update documentation based on change in DMD and LDC minimum versions. Minimum DMD version now 2.088.0 and minimum LDC version now 1.18.0.
* Security upgrade alpine Docker file to 3.16
2022-05-28 08:38:57 +10:00
Vitor Carvalho
680090a680
fix(docker): add git to docker build (#1945)
* add git for docker build process
2022-05-04 04:53:32 +10:00
Philipp
3f0d606f5b
Fix docker build, by add missing git (#1895)
* Fix docker build, by add missing git
2022-03-19 07:57:05 +11:00
ctml91
31fcf21f6d
Add documentation for Podman support (#1871)
* Add documentation for Podman support
2022-03-10 08:55:41 +11:00
abraunegg
d68c27fb4f
Add --reauth to allow easy re-authentication of the client (#1867)
* Add --reauth to allow easy re-authentication of the client
2022-03-08 05:35:00 +11:00
abraunegg
8687deec18
Improved Dockerfiles (#1795)
* Update Dockerfiles to use more modern base Linux distribution
2022-03-07 19:25:34 +11:00
abraunegg
c63b390f14
Update entrypoint.sh (#1861)
Fix applying permissions to volume directories when running in rootless podman
2022-03-06 08:26:35 +11:00
abraunegg
1ac5d87d98
Document risk regarding using --resync (#1816)
* Document risk regarding using --resync
* Implement --resync-auth
2022-01-28 08:58:38 +11:00
Marcel
a2d2ea93cb
Updated Dockerfile-alpine to 3.14 (#1722)
* Update Dockerfile-alpine
2021-11-25 06:52:41 +11:00
abraunegg
dafc37e677
Update minimum compiler versions to dmd-2.087.0 and ldc-1.17.0 (#1724)
* Update minimum compiler versions to dmd-2.087.0 and ldc-1.17.0
2021-11-25 06:05:38 +11:00
Winston R. Milling
5d7e4532ef
Add --auth-response option and expose through entrypoint.sh (#1628)
* This allows for the use of the `--auth-files` switch in the docker environment.

Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2021-11-23 07:08:04 +11:00
abraunegg
87393e639b
Update DMD version to 2.097.0 for Docker container builds (#1584)
* Update DMD version to 2.097.0 for Docker container builds
2021-07-20 05:23:18 +10:00
nrandon
72905b951f
Fix Alpine Docker lock to 3.13 (#1568)
This issue relates to a build issue on the official docker build
system where Alpine Linux 3.14 will not currently build so fix
the Alpine version to 3.13.

Make sure build and runtime image used in building the docker
container are the same Alpine version to remove runtime issues.
2021-07-14 05:13:00 +10:00
abraunegg
4b56a6103e
Fix Docker Alpine build failing due to filesystem permissions issue (#1564)
* Fix Docker Alpine build failing due to filesystem permissions issue
2021-07-12 08:06:11 +10:00
abraunegg
34f7a379f6
Fix Docker build process to source GOSU keys from updated GPG key location (#1562)
* Fix Docker build process to source GOSU keys from updated GPG key location
2021-07-11 13:21:36 +10:00
abraunegg
10606293f7
Update Docker files for Raspberry Pi (#1335)
* Revert PR #1259
* Provide dedicated armhf & aarch64 Dockerfiles
* Document updates
2021-03-14 12:59:17 +11:00
Krassimir Valev
a971dd0844
Dockerfile config for arm64 (#1259)
* Add ARCH flag to denote difference between ARMHF and ARM64 platforms
2021-02-09 07:45:37 +11:00