Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Dockerfile.decypharr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Dockerfile.decypharr
#
# Thin wrapper around the upstream Decypharr image that adds a /etc/passwd
# entry for UID 1000 ("appuser"). This is required because the container is
# run as UID 1000 (via `user: PUID:PGID` in docker-compose.yml) and
# entry for the runtime UID ("appuser"). This is required because the
# container runs as `PUID:PGID` (via docker-compose.yml) and
# fusermount3 calls `id -un` to resolve the username before mounting the
# FUSE filesystem. Without a matching passwd entry fusermount3 exits with:
#
Expand All @@ -15,9 +15,11 @@
ARG DECYPHARR_VERSION=v2.4
FROM ghcr.io/sirrobot01/decypharr:${DECYPHARR_VERSION}

ARG APP_UID=1000

# adduser flags:
# -u 1000 match the PUID used at runtime
# -u APP_UID match the PUID used at runtime
# -D no password (daemon account)
# -H do not create a home directory
# -s /bin/sh minimal shell (required by some FUSE helpers)
RUN adduser -u 1000 -D -H -s /bin/sh appuser
RUN adduser -u "${APP_UID}" -D -H -s /bin/sh appuser
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ services:
dockerfile: Dockerfile.decypharr
args:
DECYPHARR_VERSION: "v2.4"
APP_UID: "${PUID:-1000}"
image: torbox-decypharr:v2.4
container_name: decypharr
user: "${PUID:-1000}:${PGID:-1000}"
Expand Down
10 changes: 10 additions & 0 deletions setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,16 @@ function Invoke-GenerateDockerCompose {
Copy-Item -Path $SourceFile -Destination $ComposeFile -Force
Write-LogInfo "Copied docker-compose.yml to: $ComposeFile"

$DockerfileSource = Join-Path $ScriptDir "Dockerfile.decypharr"
$DockerfileDestination = Join-Path $InstallDir "Dockerfile.decypharr"
if (-not (Test-Path $DockerfileSource)) {
Write-LogWarn "Source Dockerfile.decypharr not found at: $DockerfileSource"
Write-LogStep "Failed to set up Docker Compose."
return
}
Copy-Item -Path $DockerfileSource -Destination $DockerfileDestination -Force
Write-LogInfo "Copied Dockerfile.decypharr to: $DockerfileDestination"

$OverrideFile = Join-Path $InstallDir "docker-compose.override.yml"
if (Test-Path $OverrideFile) { Remove-Item -Path $OverrideFile -Force }

Expand Down
3 changes: 2 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1319,8 +1319,9 @@ ENV_EOF
generate_docker_compose() {
log_step "Setting up Docker Compose..."

# Copy static compose file from repo to install directory
# Copy static compose file and its local build context to install directory
cp "${SCRIPT_DIR}/docker-compose.yml" "${COMPOSE_FILE}"
cp "${SCRIPT_DIR}/Dockerfile.decypharr" "${INSTALL_DIR}/Dockerfile.decypharr"

# Ensure no ghost overrides remain from previous installations
rm -f "${INSTALL_DIR}/docker-compose.override.yml"
Expand Down