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

Chapter 6 permission error with sh script #22

Open
siiiiiiiid opened this issue Mar 12, 2020 · 1 comment
Open

Chapter 6 permission error with sh script #22

siiiiiiiid opened this issue Mar 12, 2020 · 1 comment

Comments

@siiiiiiiid
Copy link

Hi,

After building the fortune pod, when I deploy it to my GKE I get an error: crashloopbackoff which usually mean I have a container that stop immediately.

When I check the logs I have something like that:
kubectl logs fortune -c html-generator
/bin/sh: 1: /bin/fortuneloop.sh: Permission denied

So it seems my script does not have the exec permission so I added in the Dockerfile the permissions:
FROM ubuntu:latest

RUN apt-get update ; apt-get -y install fortune
ADD fortuneloop.sh /bin/fortuneloop.sh
RUN chmod +x /bin/fortuneloop.sh

ENTRYPOINT /bin/fortuneloop.sh

Now it works well.

Hope it help !
Seb

@ilknarf
Copy link

ilknarf commented Jun 7, 2020

You can chmod the script outside of the Dockerfile and it will work, since Docker will copy the properties of the file.

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