--HELP-- Access Permissions errors with Docker Swarm mode Configs getting- EOF reached error reading from these configs RRS feed

  • Question

  • Hi,  First sorry for all the posts.... Trying to learn and figure out docker containers through trial and error.

    I have a service that I have created, started up in docker swarm mode with some configs that where created properly.

    When I bring in the configs during the docker create service

    docker service create --name ClientPortal --replicas 2 --publish 8080:80 --config    \                 src=appsettings_clientportal.json,target=/app/configs/appsettings.json --config    \   src=connections_clientportal.json,target=/app/configs/connections.json --config    \     src=config_clientportal.json,target=/app/ClientApp/dist/config/config.json   clientportal:latest

    I end up getting an error on the service when rendering like EOF reached reading the .json file.

    when I do docker exec -it to explore the container, I see the config file symlink with no issues.

    When I copy the configs directly to the container/image and start the service without the config parameters, the service works and renders properly.

    Is there some permission or access scenario for the containers with the symlinks to the config files that would cause this?

    The configs copied to the container are exactly the same ones used in the docker create config commands.

    thanks in advance.

    • Edited by LanceLyons Friday, October 18, 2019 5:24 PM
    Monday, October 14, 2019 9:41 PM

All replies

  • the config file that is causing issues is a config.json that is part of a Nodejs site that is combined with an aspnet core 2.2 package.   If I actually do a DOCKER CP to copy that same config to the right folder

    docker cp config.json containerid:/app/clientapp/dist/config/config.json   

    which makes it no longer a symlink, then the site reads the config.json ok and the site works...

    So I know its this one config.json and it seems to be a permission issue with the nodejs portion of the site.

    This still seems to be a permission issue with the site in container / user does not have the access to the container config defined in the docker create config.

    Monday, October 21, 2019 3:01 AM
  • Does anybody know of another source of information where I can perhaps find additional information on permissions around docker swarm mode configs?

    Hoping to get some clarification on this.

    thanks in advance.

    Monday, October 28, 2019 4:47 PM