GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docker: add mailcap for /etc/mime.types - fixes #6384 by hsdfat · Pull Request #9977 · rclone/rclone

Conversation

@hsdfat

@hsdfat hsdfat commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of this change?

The Docker image has no /etc/mime.types, so MIME types come only from Go's
built-in table plus rclone's small extra list, and many extensions upload as
application/octet-stream. This installs Alpine's mailcap package, as
suggested in the issue.

Checked by running rclone lsf --format pm over one file per extension
listed in mime.types (1393 extensions):

  • octet-stream results drop from 1313 to 9 (e.g. .tar, .rar, .heic, .jxl,
    .m4v, .flv, .aac, .woff2, .deb now get real types)
  • image size grows by about 74 KiB (93.63 MB -> 93.70 MB)

As on any Linux host with mime.types, the system file takes precedence, so a
few types change: .ts becomes text/vnd.trolltech.linguist (was video/MP2T),
.flac audio/x-flac, .wav audio/x-wav. If keeping video/MP2T for .ts matters,
I can add an override to fs/mimetype.go.

Was the change discussed in an issue or in the forum before?

Fixes #6384

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hsdfat
docker: add mailcap for /etc/mime.types - fixes rclone#6384
8977d08
@hsdfat
hsdfat requested a review from ncw as a code owner September 25, 2026 15:27
ncw
ncw approved these changes Sep 30, 2026
View reviewed changes

@ncw ncw left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Nice fix - thank you

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ncw
ncw merged commit 3cdf855 into rclone:master Sep 30, 2026
4 of 9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@hsdfat
hsdfat deleted the docker-mailcap-6384 branch November 6, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ncw ncw ncw approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Docker image: /etc/mime.types is missing

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@hsdfat @ncw
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.