Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

[fix] docker and k8s: run searx #2182

Merged
merged 1 commit into from Sep 10, 2020
Merged

[fix] docker and k8s: run searx #2182

merged 1 commit into from Sep 10, 2020

Conversation

dalf
Copy link
Contributor

@dalf dalf commented Sep 9, 2020

What does this PR do?

docs/admin/installation-docker.rst calls dockerfiles/docker-entrypoint.sh to include the help message inside the documentation.

dockerfiles/docker-entrypoint.sh detects if docker is running using grep docker /proc/1/cgroup -qa.

This method doesn't work with k8s, see #2181

This PR fixes this issue:

  • add a new parameter docs to dockerfiles/docker-entrypoint.sh
  • docs/admin/installation-docker.rst calls dockerfiles/docker-entrypoint.sh docs.

Why is this change important?

Without this PR it is possible to run the searx docker with k8s.

How to test this PR locally?

  • make docker
  • add a new docker image to microk8s
  • check if searx has started

Author's checklist

Related issues

Close #2181

return42
return42 previously approved these changes Sep 9, 2020
Copy link
Contributor

@return42 return42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested k8s, but the 'doc' option LGTM

# Parse special command line
# see docs/admin/installation-docker.rst
# display the help message without the version
if [ "$1" = "docs" ]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this called docs and not help?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the output will be included into the documentation which is produce using make docs.

But help makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@dalf dalf merged commit 8ffede6 into searx:master Sep 10, 2020
@dalf dalf deleted the docker-fix-k8s branch September 28, 2020 19:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The docker image no longer runs in k8s
3 participants