syhily / docker-orange Goto Github PK
View Code? Open in Web Editor NEWDocker distribution for Orange.
Home Page: http://orange.sumory.com
License: MIT License
Docker distribution for Orange.
Home Page: http://orange.sumory.com
License: MIT License
刚从https://store.docker.com/community/images/syhily/orange 下载的最新镜像。
按照提供的文档,数据库和应用运行正常。
但是在开始插件的时候,提示failed to enable plugin
在控制台上看到的,除了第一个 start 全局统计插件是启动的,其他所有的插件都不能够启动。
运行docker exec -it orange orange version
的版本是0.6.4
@syhily @sumory
在 docker-entrypoint.sh 里增加了:
if [[ "X${ORANGE_AUTH}" != "X" ]]; then
sed -i "s/"auth": false/"auth": "${ORANGE_AUTH}"/g" ${ORANGE_CONF}
fi
并且 run 的时候增加参数
-e ORANGE_AUTH=true
但是认证并没有生效,还是可以直接访问到 Dashboard。
在容器内查看配置文件是启用了auth的。
建议把log日志和配置文件映射出来,还有dockerfile 也无法正常使用了
Changes:
docker-compose.yml
to simplify the usage.Why not combained these commands into 1 or 2 ?
Even "nginx -V" RUN indepently...
If we combained and reduce neccessary cmds, it will reduce layers, and left more layers to users
RUN
useradd www
&& echo "www:www" | chpasswd
&& echo "www ALL=(ALL) ALL" >> /etc/sudoers
RUN
mkdir -p ${ORANGE_PATH}/logs
&& chown -R www:www ${ORANGE_PATH}/*
RUN
nginx -V
ADD docker-entrypoint.sh docker-entrypoint.sh
RUN
chmod 755 docker-entrypoint.sh
COPY docker-entrypoint.sh /usr/local/bin
查看日志
2018/05/03 11:21:28 [error] 40#40: *5 [lua] mysql_db.lua:30: query(): failed to connect: failed to connect: mysql could not be resolved (3: Host not found): nil nil, context: ngx.timer
2018/05/03 11:21:28 [error] 40#40: *5 [lua] dao.lua:386: init_selectors_of_plugin(): the size of selectors from storage is 0 when initializing plugin[divide] local selectors, context: ngx.timer
2018/05/03 11:21:28 [error] 40#40: *5 [lua] dao.lua:521: load data of plugin[divide] success, context: ngx.timer
2018/05/03 11:21:28 [error] 40#40: *5 [lua] mysql_db.lua:30: query(): failed to connect: failed to connect: mysql could not be resolved (3: Host not found): nil nil, context: ngx.timer
2018/05/03 11:21:28 [error] 40#40: *5 [lua] dao.lua:511: load data of plugin[kvstore] success, context: ngx.timer
请问这个是什么原因呢?
容器运行日志是没问题的
Check database connection
Connection closed by foreign host.
Connected
Database connected
[INFO] Orange: 0.6.4
[INFO] ngx_lua: 10008
[INFO] nginx: 1011002
[INFO] Lua: LuaJIT 2.1.0-beta2
[INFO] Orange store operation start:
[INFO] args:
[INFO] store_type:mysql
[INFO] port:3306
[INFO] host:10.97.167.48
[INFO] operation:init
[INFO] pwd:123456
[INFO] user:root
[INFO] db:orange
[INFO] file:/usr/local/orange/install/orange-v0.6.4.sql
[INFO] args end.
[INFO] Store init finished.
how to configure the upstream?
2019/08/06 10:27:25 [error] 48#48: *11 [lua] mysql_db.lua:30: query(): failed to connect: failed to connect: orange-database could not be resolved (3: Host not found): nil nil, client: 192.168.48.1, server: , request: "POST /monitor/enable HTTP/1.1", host: "127.0.0.1:8889", referrer: "http://127.0.0.1:8889/monitor"
2019/08/06 10:27:25 [error] 48#48: *11 [lua] mysql_store.lua:91: update_enable(): MySQLStore:update error:nil, client: 192.168.48.1, server: , request: "POST /monitor/enable HTTP/1.1", host: "127.0.0.1:8889", referrer: "http://127.0.0.1:8889/monitor"
2019/08/06 10:27:27 [info] 49#49: *12 client closed connection while waiting for request, client: 192.168.48.1, server: 0.0.0.0:9999
进入容器能都ping telnet 也是ok的 容器的mysql 也是可以访问的
Step 17 : RUN nginx -V && lord version
---> Running in e5a78b7bbcba
nginx version: openresty/1.11.2.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
built with OpenSSL 1.0.2j 26 Sep 2016
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.3.0 --add-module=../echo-nginx-module-0.60 --add-module=../xss-nginx-module-0.05 --add-module=../ngx_coolkit-0.2rc3 --add-module=../set-misc-nginx-module-0.31 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.06 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.6 --add-module=../ngx_lua_upstream-0.06 --add-module=../headers-more-nginx-module-0.31 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.17 --add-module=../redis2-nginx-module-0.13 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.14 --add-module=../rds-csv-nginx-module-0.07 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --with-openssl=/tmp/openssl-1.0.2j --with-pcre=/tmp/pcre-8.39 --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_xslt_module=dynamic --with-ipv6 --with-mail --with-mail_ssl_module --with-md5-asm --with-pcre-jit --with-sha1-asm --with-stream --with-stream_ssl_module --with-threads
/usr/bin/env: resty: No such file or directory
The command '/bin/sh -c nginx -V && lord version' returned a non-zero code: 127
compose.yml内容如下:
version: '2'
services:
db:
image: mysql
expose:
- "3306"
environment:
- MYSQL_ROOT_PASSWORD=docker
privileged: true
gateway:
image: syhily/docker-orange
ports:
- "27777:7777"
- "28888:8888"
- "29999:9999"
security_opt:
- seccomp:unconfined
environment:
- ORANGE_DATABASE=orange
- ORANGE_HOST=orange-database
- ORANGE_PORT=3306
- ORANGE_USER=root
- ORANGE_PWD=docker
depends_on:
- db
links:
- db:orange-database
privileged: true
启动后,ping orange-database可以访问,但使用控制台操作数据库相关,报错[error] 26#26: *7 [lua] mysql_db.lua:30: query(): failed to connect: failed to connect: orange-database could not be resolved (3: Host not found): nil nil, client: 172.22.0.1, server: , request: "POST /redirect/enable HTTP/1.1", host: "127.0.0.1:29999", referrer: "http://127.0.0.1:29999/redirect"
这要怎么处理呢?使用docker run的命令是OK的。
这个容器太大了
FROM alpine:3.7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.