Dockerfile for Tooler Failing
Z02X opened this issue · comments
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?
I first offered changing the user id and group id to 1000, I am guessing that may cause other issues is this correct?
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.
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.
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).