Giter VIP home page Giter VIP logo

Comments (6)

jbenet avatar jbenet commented on June 12, 2024

Same as #1, For docker, this means working with https://github.com/docker/distribution -- implementing https://github.com/docker/distribution/blob/master/doc/spec/api.md

from container-demos.

hosh avatar hosh commented on June 12, 2024

To simplify this demo, here is what I am thinking:

  1. First, get the IPFS-in-a-container working. This requires starting it with Docker 1.5.0 and starting it with additional privs: moby/moby#9448 (comment)
    docker run -ti --cap-add SYS_ADMIN --device /dev/fuse peter/dev:sshfs /bin/bash
  2. Use a Docker Registry (https://www.vultr.com/docs/setup-your-own-docker-registry-on-coreos) that pulls a volume from the IPFS container.

I think this will work, will just have to try and see.

from container-demos.

hosh avatar hosh commented on June 12, 2024

See: #4

from container-demos.

hosh avatar hosh commented on June 12, 2024

So --privileged worked. That example of using sshfs works. However, ipfs doesn't. When I attempt to run it, what appears to be blocking it is apparmor. Inside the container, this is what dmesg reports:

[15411407.627213] type=1400 audit(1427433682.487:81): apparmor="DENIED" operation="mount" info="failed type match" error=-13 profile="docker-default" name="/ipfs/" pid=12399 comm="fusermount" fstype="fuse" srcname="/dev/fuse" flags="rw, nosuid, nodev"
[15411407.628119] type=1400 audit(1427433682.487:82): apparmor="DENIED" operation="mount" info="failed type match" error=-13 profile="docker-default" name="/ipns/" pid=12400 comm="fusermount" fstype="fuse" srcname="/dev/fuse" flags="rw, nosuid, nodev"

Ubuntu's docker-default apparmor profile contains:

  mount fstype=fuse.*,

and it doesn't appear to be matching.

I don't know about apparmor, but I did try adding

  mount fstype=fuse,

but still get the same error.

from container-demos.

hosh avatar hosh commented on June 12, 2024

Using --volumes-from in a different container to link to a FUSE-mount inside a contaner may not be possible as it is now: https://groups.google.com/forum/#!msg/docker-dev/_8bAG561VAI/ofDLtK8dxigJ

cryptix@freenode suggested checking if it is the same with sshfs

from container-demos.

hosh avatar hosh commented on June 12, 2024

Tried it with sshfs still does not work. Limitation of Docker and all.

I think for this demo, I'll use docker exec to demonstrate being able to grab data from /ipfs. However, this would be more interesting if the HTTP API gets exposed.

For #2 though, would have to have ipfs run on the host, and then bind-mount the container to ipfs and ipns to bring up a registry, will see what happens.

from container-demos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.