Skip to content

Conversation

@daniele-athome
Copy link
Contributor

Description

This fixes an issue for local development environments of the Docker build: the wget provided by busybox doesn't support redirects. So downloading taglib returns an error later from tar (because wget previously downloaded the HTML content of the redirect). I fixed that by installing the wget package.

Related Issues

Fixes #3738.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • Other (please describe):

Checklist

Please review and check all that apply:

  • My code follows the project’s coding style
  • I have tested the changes locally
  • I have added or updated documentation as needed
  • I have added tests that prove my fix/feature works (or explain why not)
  • All existing and new tests pass

How to Test

Just run the Docker build process.

Additional Notes

I can't explain why the bug doesn't happen on GitHub Actions. Here is a log from https://github.com/navidrome/navidrome/actions/runs/16577552503/job/46885668061

#12 [taglib-build 2/2] RUN <<EOT (PLATFORM=$(echo windows/amd64 | tr '/' '-')...)
#12 0.221 Connecting to github.com (140.82.112.3:443)
#12 0.443 Connecting to release-assets.githubusercontent.com (185.199.108.133:443)
#12 0.544 saving to 'taglib-windows-amd64.tar.gz'
#12 0.580 taglib-windows-amd64 100% |********************************|  810k  0:00:00 ETA
#12 0.580 'taglib-windows-amd64.tar.gz' saved
#12 DONE 1.6s

I'm using different Docker versions, but I doubt it makes a difference:

Client: Docker Engine - Community
 Version:           28.3.3
 API version:       1.51
 Go version:        go1.24.5
 Git commit:        980b856
 Built:             Fri Jul 25 11:34:10 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          28.3.3
  API version:      1.51 (minimum version 1.24)
  Go version:       go1.24.5
  Git commit:       bea959c
  Built:            Fri Jul 25 11:34:10 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
github.com/docker/buildx v0.26.1 1a8287f

wget in busybox doesn't support redirects (required for downloading
artifacts from GitHub)
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @daniele-athome, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a critical Docker build issue affecting local development environments. The problem stemmed from the busybox version of wget being unable to follow HTTP redirects, which prevented the correct download of taglib dependencies. The solution involves explicitly installing the full wget package within the Dockerfile, ensuring reliable file downloads and a consistent build process across different environments.

Highlights

  • Docker Build Fix: Addresses an issue in Docker builds where the busybox wget utility failed to follow redirects, leading to incorrect taglib downloads in local development environments.
  • wget Installation: Installs the standalone wget package using apk add --no-cache wget within the Dockerfile to ensure proper handling of HTTP redirects during file downloads.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request fixes an issue with the busybox version of wget not handling redirects by installing the full wget package. The change is correct and addresses the problem. I've suggested an improvement to the Dockerfile RUN command to follow best practices by cleaning up temporary dependencies and files, which helps in keeping the Docker image layers lean and improving build script robustness.

@deluan
Copy link
Member

deluan commented Oct 25, 2025

Thanks!

@deluan deluan merged commit aa7f556 into navidrome:master Oct 25, 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.

[Bug]: Docker build: wget doesn't follow redirects

2 participants