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

Dockerfile to build plan9port in Alpine Linux container #618

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

JamesParrott
Copy link

Hi all.
I'm adding this for others to show which packages are definitely needed in the host environment to build plan9port, and maybe even spin up a container for themselves easily. When building from a docker file, certain errors seem to be suppressed. I hadn't noticed perl was being used at first. So it is possible I've unwittingly removed something essential. But rc seems to work on the surface.

A .gitattributes file is also included. This reduces the pain for Windows users building Docker images from a local plan9port repo (otherwise Git may change the line endings to crlf).

I haven't had much joy with https://pkgs.alpinelinux.org/package/edge/community/x86/plan9port (perhaps I hadn't carried out a final configuration step, but it appears some build directories are hardcoded into it).

This image did work: https://hub.docker.com/r/plan9d/plan9port but I've no clue what was in the hashes it builds from, so I reverse engineered it by diffing apk list--installed with alpine:build-base, and afterwards stripped out the packages unnecessary, simply to compile plan9port, by trial and error.

@sevan
Copy link
Contributor

sevan commented May 19, 2023

Seems strange to have a Perl requirement, did you confirm if that was needed?

@JamesParrott
Copy link
Author

JamesParrott commented May 19, 2023

Seems strange to have a Perl requirement, did you confirm if that was needed?

I entirely agree! It only added about 35MB to a 350-400MB image so I left it in to be safe.

I confirmed a number of calls to perl are definitely in the installation code (by simply using Ctrl+F). I believe there was even a commit to specifically call /usr/bin/perl for BSD, relying on my unreliable memory.

I cannot confirm removing perl breaks anything(*) when plan9port is built via a Dockerfile being built. So if perl's not redundant, and something else is broken without perl that I'm unaware of, perhaps someone could add a PR that makes the build process fail more noisily in the absence of perl.

(*) I've only tested running rc and calling ls in it

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.

None yet

2 participants