slackware-container icon indicating copy to clipboard operation
slackware-container copied to clipboard

How to extend image?

Open vk496 opened this issue 4 years ago • 2 comments

Related with the #12 , I would like to install some extra software in the image (gcc for example) from source. If I use slackpkg, it would download the binaries for x86-64, which would work only for x64 Docker images.

Basically, I want to declare something like this:

FROM vbatts/slackware

RUN "apt-get" install gcc

And it would no matter if I build this from a x86_64 or arm64 machine.

I was looking https://github.com/vbatts/slackware-container/blob/master/mkimage-slackware.sh, but I'm not sure if it would be easy to reuse the code from a slackware container.

vk496 avatar Aug 11 '19 16:08 vk496

Oh, I just noticed that the image is also created from the binaries...

vk496 avatar Aug 11 '19 16:08 vk496

you can presently:

FROM vbatts/slackware
RUN slackpkg update && slackpkg install -default_answer=yes -batch=yes foobar

but you'll have to do the homework yourself on library dependencies as dependency resolution is not part of slackware packages.

One other note is that slackpkg searches package names based on prefix, so if there is both a foo and foobar package, and you call slackpkg install foo it will get both. So it'll require some amount of the following characters. Which is fine because it may be the version, so you could pin the major version like slackpkg install foo-1

vbatts avatar Aug 12 '19 19:08 vbatts