Docker container with MacPorts

Mojca Miklavec mojca at macports.org
Tue Jun 25 07:52:07 UTC 2019


Dear Karan,

On Fri, 21 Jun 2019 at 22:56, Karan Sheth wrote:
>
>> (My next question would be if we could simply create a Docker image
>> with Ubuntu with macports "preinstalled", but that's for later.)
>
> As i wanted to try/learn docker, and this seemed like a good opportunity.
> I did this first and turned out it was pretty easy and awesome at the same time.
> Can you please try the out the docker image and see if it works?
> Link: https://hub.docker.com/r/kiteretsu/ubuntu-macports

Thanks a lot!

I finally got around to take time, learn some basics of Docker and
test the image.

And I ended up with a totally stupid error:

$ port info
Error: Current platform "linux 4" does not match expected platform "linux 5"
Error: If you upgraded your OS, please follow the migration
instructions: https://trac.macports.org/wiki/Migration
OS platform mismatch
    while executing
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, OS platform mismatch

Apparently you image was made with kernel version 5 and I'm using
kernel version 4, and on macOS there's probably not a whole lot one
can do about that without quite some hackery to get a newer kernel.
MacPorts tries to prevent the user from installing new ports after
upgrading to a new macOS version without rebuilding all ports. And in
this case it doesn't really help much.

My suggestion would be: could you perhaps share the sources
(Dockerfile I guess; together with some basic usage instructions)? We
could probably add a repository under github/macports-gsoc or so. Then
I could at least build an image locally instead of getting something
incompatible.

Thank you very much again for doing this,
    Mojca


More information about the macports-dev mailing list