Fix Dockerfile.arch base image error: Update archlinux/latest to archlinux #2005
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.
This pull request addresses an error in the Dockerfile.arch file caused by using an incorrect base image reference (archlinux/latest). The Docker Hub archlinux repository does not support a latest tag, which leads to a "failed to resolve source metadata" error during the Docker build process. This PR updates the base image reference to archlinux, resolving the error and allowing for a successful build.
Problem
The current Dockerfile uses archlinux/latest as the base image:
FROM archlinux/latest
Since archlinux/latest does not exist on Docker Hub, attempting to build this Dockerfile results in the following error:
ERROR: failed to solve: archlinux/latest: failed to resolve source metadata for docker.io/archlinux/latest:latest: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Steps to Reproduce
sudo docker build -t profanity -f Dockerfile.arch .
Fix
This PR modifies the Dockerfile.arch to use the correct base image, archlinux, without the non-existent latest tag:
FROM archlinux
Validation
After applying this fix, you can verify that the Docker image builds successfully:
sudo docker build -t profanity -f Dockerfile.arch .
Impact
This change ensures that the Docker build can complete successfully without requiring additional permissions or custom image sources. It aligns the Dockerfile with the official Arch Linux image structure on Docker Hub, improving compatibility and reliability for users.