What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi i run into docker/sdk up problem with permission issue: Copy and merge schema files UnexpectedVal

13

Comments

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet
    ARG USER_UID
    RUN usermod -u ${USER_UID} spryker && find / -user 1000 -exec chown -h spryker {} \; || true;
    

    That should set proper owner.

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    is there any log during build to watch?

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    PROGRESS_TYPE=plain docker/sdk build images

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Please, check that step and output.

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    how?

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    I assume it will be cached.

    docker builder prune

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Just run
    docker builder prune
    PROGRESS_TYPE=plain docker/sdk build images

    Then scroll and find RUN usermod -u ${USER_UID} spryker…

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    try new

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    7 [2/3] RUN usermod -u 1001 spryker && find / -user 1000 -exec chown -h sp...

    7 CACHED

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    tried

    ARG CACHEBUST=1
    

    now its not cached .. try up now

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    nope doesnt changed anything ..

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok removed all, checkout suite tag 1.6 and now sdk 1.14.3 ..

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok i had to change something in the build scripts

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    my local user id is not 1000 its 1001

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    after changing all usermod from ${USER_ID} to 1001 it worked .. how is the userid passed into the build process .. maybe something goeing wrong here

  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet
    --build-arg USER_UID=${USER_UID:-1000} \
    --build-arg USER_GID=${USER_GID:-1000} \
    

    how can i pass my correct UID and GID?

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    It does actually use id to get those.

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    And that works in your case. As spryker(1001) inside container.

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    But WHY it does not change ownership of /var/log/spryker - that’s the question.

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    I have an idea…

    add in your deploy.dev.yml

    docker:
    logs:
    path: /home/spyrker/logs

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    It will put the folder into home directory and it will be automatically under the correct user.

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    However the code below should do the same:

    RUN usermod -u ${USER_UID} spryker && find / -user 1000 -exec chown -h spryker {} \; || true;
    
  • U015AQKSZJ7
    U015AQKSZJ7 Posts: 52 πŸ§‘πŸ»β€πŸš€ - Cadet

    First of all i change my host uid from 1001 to 100 0 which resolves the first issue here .. i will try to reproduce this issue on a second machine maybe i find a solution for this. looks like a docker namepspacing issue on ubuntu 20.04 …

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    if your id is the same - that is solution. However it won’t fit everybody. I will create a ticket for investigation on our side.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    I'm running docker/sdk on Ubuntu flawlessly. Previously on 19.04 and 19.10, now on 20.04.

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited July 2020

    @valerii.trots What ID of the user you use?

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    on the host?

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    In your case it is good as you have ID=1000 , the same ID that baked in Spryker image. πŸ™‚

  • sprymiker
    sprymiker Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    It was good for me in Tiny Linux with different ID.