Giter Club home page Giter Club logo

Comments (14)

shader avatar shader commented on August 21, 2024

I seem to have been able to bypass this error by commenting out the following line:
https://github.com/bcgov/permitify/blob/c02d53666295e559ff1ae6eb90c342f3e250b66a/docker/permitify/Dockerfile#L19

I have no idea what other repercussions this may have

from greenlight.

WadeBarnes avatar WadeBarnes commented on August 21, 2024

Commenting out that line has ramifications for running in OpenShift. Basically your running the commands as root rather than a regular user.

@shader, what OS are you using?

@nrempel, I think we need to set the permissions on the target folder so the scripts can copy the templates. Would you agree?

from greenlight.

nrempel avatar nrempel commented on August 21, 2024

@WadeBarnes I think changing the permissions on the target folder should fix this issue without breaking the Openshift deployment.

@shader for now, commenting that out shouldn't affect you if you are not using Openshift.

from greenlight.

shader avatar shader commented on August 21, 2024

Yes, I'm running it locally. I'm just trying to get the demo working, and I thought that would be the easiest way.

Commenting out the line does have the unfortunate side-effect of placing root-owned files in the src directory. But I'm not sure that using id 10001 as the default user makes any more sense for local deployment; for example, my user (which owns the rest of the files in src) has ID 1000. ID 10001 doesn't even exist on my system.

from greenlight.

WadeBarnes avatar WadeBarnes commented on August 21, 2024

@shader, What OS are you running docker on? I'm assuming some flavor of Linux.

The selection of 10001 is meant to not correspond to an existing account, since OpenShift assigns a random user to the running pod. So the purpose is to mimic that behavior.

from greenlight.

nrempel avatar nrempel commented on August 21, 2024

@CyWolf Wade mentioned you had similar issues to this? Are you running Linux?

from greenlight.

shader avatar shader commented on August 21, 2024

Yes, I'm running a flavor of Linux. If the intent is to use a non-existent user ID, then I suppose it should be fine. There's still a non-zero chance of collision, but I'm not sure if that would be an issue.

Changing the src directory permissions might work. Two other possible solutions:

  1. You could have the manage script copy the configuration files, instead of the docker-entrypoint.sh script. Then it would be handled by the user running the manage script, who presumably owns the src directory.

  2. I was also able to load the configuration by using the docker-compose volume configuration to load the config.toml and schemas.json files directly.

I switched away from the latter to commenting out the USER line because I ran into other permissions-related bugs., so they're probably not complete solutions.

from greenlight.

shader avatar shader commented on August 21, 2024

With just chmod a+rw on permitify/src, I now get the following error instead:

bc_registries_1 | INFO|indy::commands::signus | src/commands/signus.rs:159 | CreateAndStoreMyDid command received                                                     
bc_registries_1 | INFO|indy::services::pool   | src/services/pool/mod.rs:891 | Sending "pi"                                                                             
bc_registries_1 | ERROR|indy::errors::indy    | src/errors/indy.rs:63  | Casting error to ErrorCode: Invalid library state: Unexpected SQLite error: attempt to write a readonly database                                                                                  
bc_registries_1 | WARNING 2018-01-30 22:07:39,572 libindy 19 140569172309760 _indy_loop_callback: Function returned error 112

from greenlight.

nrempel avatar nrempel commented on August 21, 2024

What version of Docker are you running?

from greenlight.

shader avatar shader commented on August 21, 2024

Docker version 17.09.1-ce, build 19e2cf6
docker-compose version 1.18.0, build 8dd22a9

from greenlight.

shader avatar shader commented on August 21, 2024

Oops, that last error is probably because I ran it as root once and made a root sqlite.db file in the bc_registries_wallet volume. I dropped that volume and no longer run into that error.

from greenlight.

nrempel avatar nrempel commented on August 21, 2024

What are the permissions of the project directory on your host machine?

What is the output of ls -la?

Try commenting out lines 17 and 18 (https://github.com/bcgov/permitify/blob/master/docker/docker-compose.yml#L17) in docker-compose.yml then build and try again.

from greenlight.

shader avatar shader commented on August 21, 2024

All of my directories default to drwxr-xr-x user:user. I used chmod a+w to change permitify/src to drwxrwxrwx though.

from greenlight.

swcurran avatar swcurran commented on August 21, 2024

Not sure what the outcome of this precise issue, but much work has been done on the manage script since and all is looking good on a variety of platforms. Closing this.

from greenlight.

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.