Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested #9536

Open
avivasyuta opened this issue Jan 28, 2024 · 3 comments

Comments

@avivasyuta
Copy link

Operating System

macOS 14.2.1 (23C71)

Ruby Version

2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23]

Jekyll Version

jekyll 4.2.2

GitHub Pages Version

No response

Expected Behavior

Jekyll image runs in a docker container on macBooks with Apple Silicon chips. I have m3 Pro chip.

Current Behavior

Jekyll image run fails.

Relevant log output

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
chown: _site/feed.xml: Permission denied
chown: _site/2024/01/10/single_number.html: Permission denied
chown: _site/2024/01/10: Permission denied
chown: _site/2024/01/10: Permission denied
...

Code Sample

https://github.com/algorithmics-blog/algorithmics-blog.github.io

@alexohneander
Copy link

@avivasyuta can you tell me which image you are using?

@avivasyuta
Copy link
Author

avivasyuta commented Mar 22, 2024

I use jekyll/jekyll:4.2.2.

Here is my make script

JEKYLL_VERSION=4.2.2

serve:
	docker run --rm \
	  --volume=$(PWD):/srv/jekyll \
	  -p 4000:4000 \
	  -it jekyll/jekyll:$(JEKYLL_VERSION) \
	  jekyll serve --livereload

@mkasberg
Copy link
Contributor

The warning you're seeing is caused by running an amd64 Docker image on an M1 mac (or other ARM device) and is unrelated to your permission denied errors. You can add some options to your Docker command to make the warning go away if desired, but the warning isn't actually causing any problems.

The real problem is chown: _site/feed.xml: Permission denied. A filesystem permissions issue related to different user IDs (different owners) between the Docker container and your host machine. Possibly a new UID on your new M3 machine? Usage of JEKYLL_UID and JEKYLL_GID is documented in the jekyll-docker README.

Docker entrypoint chown

In short, this isn't a bug with Jekyll, and I think you can fix the problem with JEKYLL_UID (or perhaps just remove the _site dir on the host machine and allow it to be regenerated).

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

No branches or pull requests

3 participants