mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-02-14 09:39:56 +00:00
43 lines
1.7 KiB
Plaintext
43 lines
1.7 KiB
Plaintext
FROM 10.10.10.3:5000/local/kubeinvaders_base:develop
|
|
|
|
# Install KubeInvaders (html and js)
|
|
COPY html/ /var/www/html
|
|
|
|
# Configure Redis
|
|
COPY confs/redis/redis.conf /etc/redis/redis.conf
|
|
|
|
# Configure Nginx and KubeInvaders conf
|
|
RUN sed -i.bak 's/listen\(.*\)80;/listen 8081;/' /etc/nginx/conf.d/default.conf
|
|
RUN mkdir -p /usr/local/openresty/nginx/conf/kubeinvaders/data
|
|
COPY nginx/nginx.conf /etc/nginx/nginx.conf
|
|
COPY nginx/KubeInvaders.conf /etc/nginx/conf.d/KubeInvaders.conf
|
|
RUN chmod g+rwx /var/cache/nginx /var/run /var/log/nginx /etc/nginx/conf.d
|
|
RUN chmod 777 /var/www/html
|
|
|
|
# Copy LUA scripts
|
|
COPY scripts/metrics.lua /usr/local/openresty/nginx/conf/kubeinvaders/metrics.lua
|
|
COPY scripts/pod.lua /usr/local/openresty/nginx/conf/kubeinvaders/pod.lua
|
|
COPY scripts/ingress.lua /usr/local/openresty/nginx/conf/kubeinvaders/ingress.lua
|
|
COPY scripts/node.lua /usr/local/openresty/nginx/conf/kubeinvaders/node.lua
|
|
COPY scripts/kube-linter.lua /usr/local/openresty/nginx/conf/kubeinvaders/kube-linter.lua
|
|
COPY scripts/chaos-node.lua /usr/local/openresty/nginx/conf/kubeinvaders/chaos-node.lua
|
|
COPY scripts/chaos-containers.lua /usr/local/openresty/nginx/conf/kubeinvaders/chaos-containers.lua
|
|
COPY scripts/programming_mode.lua /usr/local/openresty/nginx/conf/kubeinvaders/programming_mode.lua
|
|
COPY scripts/config_kubeinv.lua /usr/local/openresty/lualib/config_kubeinv.lua
|
|
COPY scripts/data/codenames.txt /usr/local/openresty/nginx/conf/kubeinvaders/data/codenames.txt
|
|
|
|
# Copy Python helpers
|
|
COPY scripts/programming_mode /opt/programming_mode/
|
|
COPY scripts/metrics_loop /opt/metrics_loop/
|
|
COPY scripts/logs_loop /opt/logs_loop/
|
|
|
|
EXPOSE 8080
|
|
|
|
ENV PATH=/usr/local/openresty/nginx/sbin:$PATH
|
|
|
|
COPY ./entrypoint.sh /
|
|
|
|
RUN chmod a+rwx ./entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|