Closed liuwenru closed 7 years ago
Why not use offical kong docker images?
for docker images we want use our own bash script to start a docker container , we need custom our ENTRYPOINT
, so please give me some help or prompt about this problem
I think you should show your configuration, such as Dockerfile or something... Otherwise, we can't know how you did.
My Dockerfile like this
FROM registry.epoint.com.cn/base/epoint_alpine_glibc_base:v1.5
MAINTAINER Liu Wen Ru "liuwr@epoint.com.cn"
COPY Apps /opt/Apps
RUN apk update && apk upgrade && \ apk add --no-cache readline-dev pcre-dev openssl openssl-dev gcc perl perl-dev bash git unzip nodejs && \ cd /opt/Apps && \ tar -zxvf openresty-1.11.2.2.tar.gz && \ cd openresty-1.11.2.2 && \ ./configure \ --prefix=/opt/openresty1.11.2.2 \ --with-luajit \ --with-pcre-jit \ --with-ipv6 \ --with-http_ssl_module \ --without-luajit-lua52 \ --with-http_realip_module \ --with-http_stub_status_module \ --with-debug && \ make -j2 && make install && \ ln -s /opt/openresty1.11.2.2 /usr/local/openresty && \ echo "export PATH=\$PATH:/usr/local/openresty/bin" >> /etc/profile && \ echo "export PATH=\$PATH:/usr/local/openresty/nginx/sbin" >> /etc/profile && \ echo "export OPENSSL_DIR=/usr" >> /etc/profile && \ source /etc/profile && \ unzip /opt/Apps/serf_0.8.1_linux_amd64.zip -d /usr/local/bin/ && \ cd /opt/Apps/ && \ tar -zxvf luarocks-2.4.2.tar.gz && \ cd luarocks-2.4.2 && \ ./configure \ --lua-suffix=jit \ --with-lua=/usr/local/openresty/luajit \ --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 && \ make build && make install && \ cd /opt/Apps && \ unzip kong-0.10.1.zip -d /opt/ && \ cd /opt/kong-0.10.1/ && \ make install && \ ln -s /opt/kong-0.10.1 /usr/local/kong && \ echo "export PATH=\$PATH:/usr/local/kong/bin" >> /etc/profile && \ source /etc/profile && \ mkdir /etc/kong && \ cp /usr/local/kong/kong.conf.default /etc/kong/kong.conf && \ cd /opt/Apps && \
#cd kong-dashboard-2.0.0 && \
#npm install -g --registry https://registry.npm.taobao.org && \
cp /opt/Apps/docker_launcher.sh /etc/init.d/start.sh && \
chmod +x /etc/init.d/start.sh && \
rm -rf /opt/Apps
ENV appbasepath /usr/local/orange
ENTRYPOINT ["/usr/local/bin/dumb-init", "/etc/init.d/start.sh"]
my start.sh like this
cd /usr/local/kong
source /etc/profile
export KONG_NGINX_DAEMON="off"
exec kong start
Recently I also write a Dockerfile like yours, but different way...
I don't compile kong source code, instead of putting a executable file like .deb
.
The Dockerfile look like:
FROM ubuntu:14.04
RUN sudo apt-get update
RUN sudo apt-get install -y openssl libpcre3 procps perl dnsmasq
COPY kong-0.10.1.trusty_all.deb /
RUN sudo dpkg -i kong-0.10.1.trusty_all.deb
CMD ["bash", "run.sh"]
Then we can write a run.sh
, the same to your start.sh
, to start kong.
run.sh
sudo start kong
and it work.
but I use the centos and build from source , do not use docker , it works !
@ShinEDL thinks for your help , i compile openresty with the openssl and prce source file , it can works
Note: GitHub issues should be reserved only for bug reports. Please use the Kong mailing list or Gitter for user support, development questions, feature requests, etc.
Summary
SUMMARY_GOES_HERE
Steps To Reproduce
sorry, my english is not good.
Additional Details & Logs
$ kong version
) 0.10.1$ kong start --vv
)<KONG_PREFIX>/logs/error.log
)