vbatts / slackware-container

Minimal rootfs creation for slackware linux (ideal for container images)
https://hub.docker.com/r/vbatts/slackware
99 stars 28 forks source link

Workaround for moby/moby/#27789 #10

Closed heichblatt closed 7 years ago

heichblatt commented 7 years ago

This issue is fixed in Docker 1.13, but many distributions still include 1.12. This change should change nothing for those already on 1.13+.

vbatts commented 7 years ago

did you mean to close this PR?

On Thu, Apr 20, 2017 at 5:12 PM Hannes Eichblatt notifications@github.com wrote:

Closed #10 https://github.com/vbatts/slackware-docker/pull/10.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vbatts/slackware-docker/pull/10#event-1051357328, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEF6ZUaGfRx0-vW6aSFRsc1dET1tu3uks5rx8pQgaJpZM4NDk0q .

heichblatt commented 7 years ago

Yes, I meant to. The fix only works under certain conditions and does not yet make the scripts completely distro-agnostic. I hope to follow up with a more comprehensive PR.

vbatts commented 7 years ago

Right on

On Fri, Apr 21, 2017, 02:45 Hannes Eichblatt notifications@github.com wrote:

Yes, I meant to. The fix only works under certain conditions and does not yet make the scripts completely distro-agnostic. I hope to follow up with a more comprehensive PR.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/vbatts/slackware-docker/pull/10#issuecomment-296095378, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEF6VeM8Nfd4YA_wDlq4dG-nO6HxbW2ks5ryFCWgaJpZM4NDk0q .

heichblatt commented 7 years ago

In fact, I have a question and since GH has closed private messaging, I figured I'd ask right here.

I try to have the image built regularly by a Jenkins instance while putting the build process itself in a container. The Jenkins build step would look something like this:

$ docker run --privileged -v /var/run/docker.sock:/var/run/docker.sock -v $PWD:/usr/src/slackware-docker centos:7 bash -c \ "yum install -y ruby make sudo docker-client && yum clean all && cd /usr/src/slackware-docker && time USER=local make V=1 all"

It's not beautiful but it works for now.

At some point mkimage-slackware.sh will bind-mount /dev into the chroot directory and start to populate it (slackpkg .. upgrade-all?), which leaves some files in the container's /dev and in turn in the host's /dev, which is undesirable. Do you know some way to maybe use the host's /dev but keep it read-only while keeping the container's /dev writable (some kind of overlay)? I know it sounds crazy, but otherwise one could only build on Slackware without risking a mixed /dev. Any other ideas?

vbatts commented 7 years ago

there is no bind of dev, it is using the kernel's devtmpfs (see https://github.com/vbatts/slackware-docker/blob/master/mkimage-slackware.sh#L96). Ideally no container should be left with anything in /dev/ ever.

heichblatt commented 7 years ago

Thanks, I'll look into it.