Git Product home page Git Product logo

Comments (6)

jackross avatar jackross commented on August 23, 2024 1

@m0ppers Finally got a chance to play with 2.8.3 today, and I'm still encountering issues, although the issues did change slightly as a result of your changes to the 2.8.3 release. To recap, using the following docker-compose.yml:

app:
  image: arangodb:2.8.3
  volumes_from:
    - arangodb_data
  ports:
    - 8529:8529
  environment:
    - ARANGO_NO_AUTH=1

arangodb_data:
  image: tianon/true
  volumes:
    - /var/lib/arangodb

and then running:

docker-compose up

I get the following:

Creating cdparangodb_arangodb_data_1
Creating cdparangodb_app_1
Attaching to cdparangodb_arangodb_data_1, cdparangodb_app_1
app_1           | touch: cannot touch '/var/lib/arangodb/_rwcheck_80b3df00987e': Permission denied
app_1           | We seem to not have proper rw access to /var/lib/arangodb. Please make sure that every mounted volume has full rw access for user arangodb (uid=999(arangodb) gid=999(arangodb) groups=999(arangodb))
cdparangodb_arangodb_data_1 exited with code 0
cdparangodb_app_1 exited with code 55

which, looking through the entrypoint script, seems to make sense...

I should add that I get this on Mac OS X, _as well as on an Ubuntu 15.10 machine directly_. Not saying that there is a problem, but could you direct me as to how I could set up permissions correctly so as to use a mounted data only volume?

from arangodb-docker.

m0ppers avatar m0ppers commented on August 23, 2024 1

I forgot to mention something important. Sorry.

As we are now leaving out any chowns you are responsible to setup proper permissions. In your first attempt you were mounting the apps directory from your local mac. So to make that work you just need to make sure that uid,gid 999 is allowed to write there on your local mac (chmod 777 for the lazy :D).

The data volume however is coming from the tianon/true image. This image doesn't know anything about the arangodb user needing permission on the data directory so the volume will be created as root and PENG arangodb can't write to it.

So to make that work the following change to the data image should work:

arangodb_data:
  image: arangodb:2.8.3

The image already contains the volume /var/lib/arangodb so that can be omitted. What is furthermore happening when using the arangodb image: it will come with proper uid/gid settings for that directory (https://github.com/arangodb/arangodb-docker/blob/official/Dockerfile.templ#L38)

Hope that works for you. Sorry this is a great usability madness. The only way to fix that which comes to my mind is going back to run arangodb as root bu that is certainly not best practice. If somebody comes up with a more useable solution we would be happy to incorporate it :(

from arangodb-docker.

m0ppers avatar m0ppers commented on August 23, 2024

Fail! We changed our docker setup for 2.8.2 and are using a dedicated user "arangodb" since 2.8.2. Upon startup we are ensuring proper access (rw) to our data and apps directories. This is currently done using chown. This works properly when using Linux.

When using a Mac there is however one more indirection as the mac has to first share the apps directory with the docker machine. A chown from inside the docker container will then fail even though the setup runs as root because the chown is not allowed to pass from the docker machine to your local machine (via shared folder functionality).

Long story short: We will change the chown to a simple "are we allowed to write" check. We are currently creating 2.8.3 and will fix it there :)

2.8.3 should be available the next days :)

from arangodb-docker.

jackross avatar jackross commented on August 23, 2024

Who knew the most critical piece of information provided was the very last piece (OS X). It definitely pays to provide as much info as possible. Thanks for following up!

from arangodb-docker.

sartaj avatar sartaj commented on August 23, 2024

Hi @m0ppers thanks for the heads up.

Until a better use case is resolved, I'd highly recommend adding instructions on what to do on Docker Hub.

from arangodb-docker.

dothebart avatar dothebart commented on August 23, 2024

https://hub.docker.com/_/arangodb/ mentions this under "persistant data"

from arangodb-docker.

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.