Skip to content

Commit

Permalink
debug docker img
Browse files Browse the repository at this point in the history
  • Loading branch information
haobibo committed Nov 20, 2024
1 parent c8fe941 commit 010b5be
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
6 changes: 6 additions & 0 deletions docker_devbox/work/start-caddy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
[ $BASH ] && [ -f /etc/profile ] && [ -z $ENTER_PROFILE ] && . /etc/profile

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

URL_PREFIX=${JUPYTERHUB_SERVICE_PREFIX:-"/"} exec /usr/local/bin/caddy run --config /etc/caddy/Caddyfile
6 changes: 6 additions & 0 deletions docker_devbox/work/start-supervisord.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
[ $BASH ] && [ -f /etc/profile ] && [ -z $ENTER_PROFILE ] && . /etc/profile

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

LOG_FORMAT=json exec supervisord -c /etc/supervisord/supervisord.conf
6 changes: 3 additions & 3 deletions docker_searxng/demo/docker-compose.searxng-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ services:
- SEARXNG_TLS=${LETSENCRYPT_EMAIL:-internal}
- UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4}
- UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4}
# user: searxng
# user: root
# command: ["/opt/searxng/start-supervisord.sh"]
# command: ["tail", "-f", "/dev/null"]
cap_drop: ["ALL"]
cap_add: ["CHOWN", "SETGID", "SETUID", "NET_BIND_SERVICE"]
# cap_drop: ["ALL"]
# cap_add: ["AUDIT_WRITE", "CHOWN", "SETGID", "SETUID", "NET_BIND_SERVICE"]
logging:
driver: "json-file"
options:
Expand Down
4 changes: 2 additions & 2 deletions docker_searxng/searxng.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN set -eux \
&& SEARXNG_GID=977 && SEARXNG_UID=977 \
&& addgroup -gid ${SEARXNG_GID} searxng \
&& adduser -uid ${SEARXNG_UID} --disabled-password --home /opt/searxng -shell /bin/bash --ingroup searxng searxng \
&& usermod -aG root searxng \
&& apt-get -qq update -yq --fix-missing && apt-get -qq install -yq --no-install-recommends \
libxslt-dev zlib1g-dev libffi-dev libssl-dev \
&& pip install -U pyyaml uwsgi \
Expand All @@ -28,7 +29,7 @@ RUN set -eux \
# Clean up and display components version information...
&& fix_permission searxng /opt/searxng/ \
&& chmod +x /opt/searxng/*.sh \
&& chmod -R ugo+rws /var/log \
&& chmod -R ugo+rws /var/log /var/run \
&& list_installed_packages && install__clean

ENV SEARXNG_HOSTNAME="http://localhost:8000"
Expand All @@ -52,4 +53,3 @@ SHELL ["/bin/bash", "--login", "-o", "pipefail", "-c"]
WORKDIR /opt/searxng
CMD ["/opt/searxng/start-supervisord.sh"]
EXPOSE 8080 9001 8000
USER searxng
3 changes: 2 additions & 1 deletion docker_searxng/work/etc/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ chown=root:supervisor

[inet_http_server]
port=:9001
# username=root

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
Expand Down Expand Up @@ -39,7 +40,7 @@ redirect_stderr=false


[program:searxng]
# directory=/root/
# user=searxng
command=/opt/searxng/start-searxng.sh
# command=/opt/searxng/dockerfiles/docker-entrypoint.sh
stdout_logfile=/var/log/searxng.stdout.log
Expand Down

0 comments on commit 010b5be

Please sign in to comment.