Skip to content

Conversation

JackGlobetrotter
Copy link
Contributor

@JackGlobetrotter JackGlobetrotter commented Aug 4, 2025

Title

Fixed Dockerfile build issues and cleaned up Dockerfile

Description

The Dockerfile does contain some issues:

  • files are copied into root dir leading to build issues with uv sync (missing files mainly)
  • no workdir is set while building
  • uv sync run multiple times

The above issues are addressed as follows:

  • change to workdir earlier
  • copy all files from git
  • build via uv sync once

The Workdir remains /music, but it must be mounted as volume.

Further suggested changes

Make the default entrypoint command run the web interface fur better use without external commands in docker context?

ENTRYPOINT ["uv", "run", "spotdl", "web", "--host", "0.0.0.0"]

Related Issue

closes #2300
closes #2422 (as the uv sync bug persisted for spotdl installation)

How Has This Been Tested?

Tested on RPI4, Ubuntu Sever 24.04

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have added tests to cover my changes
  • All new and existing tests passed

@SahirHuq
Copy link

SahirHuq commented Aug 5, 2025

@claude is this ok

@Silverarmor Silverarmor requested a review from Copilot August 10, 2025 21:49
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes several Dockerfile build issues including incorrect file copying, missing workdir setup, and redundant uv sync operations. The changes streamline the build process and ensure proper directory structure for the spotDL Docker container.

Key changes:

  • Establishes proper working directory structure with /app for build and /music for downloads
  • Replaces selective file copying with full repository copy to avoid missing dependencies
  • Eliminates redundant uv sync execution and removes unnecessary ADD command

Silverarmor and others added 2 commits August 11, 2025 09:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Silverarmor Silverarmor changed the base branch from master to dev August 10, 2025 21:53
@Silverarmor Silverarmor merged commit ca818a5 into spotDL:dev Aug 10, 2025
@Silverarmor Silverarmor mentioned this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker build is failing to build Docker image build failing
3 participants