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

Add package in Dockerfile for bash #29

Open
Ryner51 opened this issue Jan 31, 2019 · 1 comment
Open

Add package in Dockerfile for bash #29

Ryner51 opened this issue Jan 31, 2019 · 1 comment

Comments

@Ryner51
Copy link

Ryner51 commented Jan 31, 2019

I noticed that the Dockerfile in docker/operator pulls from alpine:3.8.

It would be nice to add the ability to execute bash on the pod to verify that any configuration files are being deployed correctly.

Example command:
kubectl exec -ti /bin/bash

Output:
kubectl exec -ti /bin/bash
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: "/bin/bash": stat /bin/bash: no such file or directory": unknown

Docker File Enhancement:
RUN apk add --no-cache bash

@fahlke
Copy link

fahlke commented Apr 5, 2020

I would suggest to not extend the container image with unnecessary stuff (e.g. Bash).

Either use ephemeral/debug containers when you have the alpha feature gate (EphemeralContainers) activated in Kubernetes 1.18+ or simply use /bin/ash or /bin/sh with kubernetes exec in Alpine container images.

kubectl exec -ti ${POD_NAME} -- /bin/ash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants