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

curl - check script #29

Open
ReSearchITEng opened this issue Jul 1, 2019 · 8 comments
Open

curl - check script #29

ReSearchITEng opened this issue Jul 1, 2019 · 8 comments

Comments

@ReSearchITEng
Copy link
Contributor

Provided that keepalived is mainly used for web purposes, and provided that keepalived usually needs a check script, I think the image needs curl package.

(see also #27).

@ReSearchITEng
Copy link
Contributor Author

I noticed that the docker image on docker-hub does not match the Dockerfile.
https://github.com/osixia/docker-keepalived/blob/stable/image/Dockerfile -> does contain curl, which the images from https://hub.docker.com/r/osixia/keepalived do not...

@BertrandGouny
Copy link
Member

BertrandGouny commented Jul 5, 2019

@ReSearchITEng it's the same file use on github and for the docker image
curl is installed and then removed check

@ReSearchITEng
Copy link
Contributor Author

yes, it's there in the Dockerfile, but not in the images...
Am I doing something wrong?

 docker run -d --name test osixia/keepalived:latest

 docker exec test curl
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"curl\": executable file not found in $PATH"

docker exec test /bin/curl
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"/bin/curl\": stat /bin/curl: no such file or directory"

[docker@docker01:0 ~]$ docker exec -ti test bash
bash-4.3# curl
bash: curl: command not found
bash-4.3# which bash
/bin/bash
bash-4.3# which curl
bash-4.3# which curl | wc -l
0

@BertrandGouny
Copy link
Member

in the same run statement curl is installed to download keepalived sources and then removed, so yes it's not available in the docker image

install :

removed

@ReSearchITEng
Copy link
Contributor Author

ReSearchITEng commented Jul 5, 2019

Oh, sorry, I see the remove.
so, can we keep it, for the reason presented in this issue: check scripts usually do curl to figure out if their servers are healthy.
Other than that, it's a great image, where one can mount inside config and check scripts, without providing huge amounts of params.
(We have templates for config, so no need for passing too many params).

Should you agree with it, here is the PR: #30

ReSearchITEng referenced this issue in ReSearchITEng/docker-keepalived Jul 5, 2019
keeping curl
@BertrandGouny
Copy link
Member

Thanks for the PR will try no make a release later today :)

@ReSearchITEng
Copy link
Contributor Author

Thanks for accepting the change.
FYI, we've added your docker image as the default keepalived option for to our project kubernetes installation project: https://github.com/ReSearchITEng/kubeadm-playbook/blob/50a26fd52ae32b6782caf23e941f44667771ede7/roles/keepalived/tasks/main.yaml#L26

@linkvt
Copy link

linkvt commented Nov 22, 2020

@BertrandGouny ticket can be closed, curl exists inside the container.

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

3 participants