Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile for Tooler Failing #93

Closed
Z02X opened this issue Oct 18, 2022 · 5 comments · Fixed by #101
Closed

Dockerfile for Tooler Failing #93

Z02X opened this issue Oct 18, 2022 · 5 comments · Fixed by #101
Assignees
Labels
bug Something isn't working

Comments

@Z02X
Copy link

Z02X commented Oct 18, 2022

What happened?

docker.errors.BuildError: The command '/bin/sh -c addgroup -g ${GROUP_ID} -S tooler && adduser -u ${USER_ID} -S tooler -G tooler' returned a non-zero code: 1

What did you expect to happen?

Command succeeds. Possibly uses 1000 for user and group

How can we reproduce it (as minimally and precisely as possible)?

I am not 100% sure why it is failing because I don't see debug output as to what went wrong. I think what is going on is that GROUP_ID & USER_ID are resulting to 0 because it is being run on root.

What is the content of the Deckfile you are using?

cluster:
  provider: k3d
  minVersion: 4.0.0
  name: kubeinator
  nativeConfig:
    apiVersion: k3d.io/v1alpha4
    kind: Simple
    servers: 1
    agents: 1
    kubeAPI:
      hostPort: "6445"
    image: rancher/k3s:v1.22.9-k3s1
    ports:
      - port: 61346:80
        nodeFilters:
          - loadbalancer
      - port: 31820:31820
        nodeFilters:
          - agent:0

decks:
  - name: portainer
    namespace: portainer
    sources:
    - type: helm
      ref: https://portainer.github.io/k8s/ # latest, alpha
      chart: portainer
      releaseName: portainer
      parameters:
      - name: tls.force
        value: true

# The deck might be wrong but I don't think that is relevant to this issue.

OS version

PRETTY_NAME="Debian GNU/Linux bookworm/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Anything else we need to know?

Would it be okay to detect this and set them to 1000 like in the other cases in build_user_container?

@Z02X Z02X added the bug Something isn't working label Oct 18, 2022
@Z02X
Copy link
Author

Z02X commented Oct 19, 2022

I first offered changing the user id and group id to 1000, I am guessing that may cause other issues is this correct?

@Z02X
Copy link
Author

Z02X commented Oct 19, 2022

I have worked around this by making my own image for deck-tooler but I am not sure how we wont to solve this for more people.

@Schille Schille self-assigned this Oct 19, 2022
@Schille
Copy link
Collaborator

Schille commented Oct 19, 2022

Hi @Z02X
Thanks for bringing this up. This issue is potentially related to #85, addgroup might not be available.

@Z02X
Copy link
Author

Z02X commented Oct 19, 2022

Ya I believe it may be the same issue, and since it is run in a container I don't think it's missing the commands but is more likely what I pointed out.

@Schille
Copy link
Collaborator

Schille commented Oct 20, 2022

Just like @Z02X I wonder why those commands should be missing in a Docker container. It probably has something to do with the given user ids (which are on linux platforms statically 1000).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants