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

hack: update test dockerfile #192

Merged
merged 1 commit into from
Dec 8, 2017

Conversation

tonistiigi
Copy link
Member

The biggest update is the separation of buildkit-containerd and container-runtime stages that can be built into separate containers and used together like.

docker build -t containerd -f ./hack/dockerfiles/test.Dockerfile --target containerd-runtime .

docker build -t buildd-containerd -f ./hack/dockerfiles/test.Dockerfile --build-arg BUILDKIT_TARGET=containerd .

docker run -d --privileged -v /tmp:/tmp:rshared --name containerd containerd

docker run -d --privileged -p 1234:1234 --volumes-from containerd buildd-containerd --addr tcp://0.0.0.0:1234 --debug

docker exec containerd ctr image ls

export BUILDKIT_HOST=tcp://127.0.0.1:1234

buildctl du

@AkihiroSuda Do you have ideas for doing the -v /tmp:/tmp:rshared part better? It is needed for mounting the subpath in buildkit and using it in containerd. Apart from being ugly it doesn't work in docker4mac for example because it tries to mount tmp from osx(/var:/tmp would work but create unexpected files).

While testing this I once got an error failed to prepare because parent doesn't exist so I think there is still some issue with containerd gc. Related to #159

Signed-off-by: Tonis Tiigi [email protected]

Signed-off-by: Tonis Tiigi <[email protected]>
@AkihiroSuda
Copy link
Member

Do you have ideas for doing the -v /tmp:/tmp:rshared

Does VOLUME /tmp work?

@tonistiigi
Copy link
Member Author

@AkihiroSuda I don't think so. This would just create a shared volume but we need a shared propagation as well so the new mountpoints show up.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge now and consider it again later

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.

2 participants