docker install openresty and python and grafana


#FROM debian:stretch-slim
#FROM cnshdocker.sh.cn.ao.ericsson.se/cgc_sep/ubuntu
FROM ubuntu:14.04

ARG GRAFANA_URL="https://s3-us-west-2.amazonaws.com/grafana-releases/master/grafana-latest.linux-x64.tar.gz"
ARG GF_UID="472"
ARG GF_GID="472"

ENV https_proxy=http://10.175.250.81:8080/
ENV http_proxy=http://10.175.250.81:8080/

#ENV http_proxy=http://www-proxy.lmera.ericsson.se:8080
#ENV https_proxy=http://www-proxy.lmera.ericsson.se:8080

ENV PATH=/usr/share/grafana/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
GF_PATHS_DATA="/var/lib/grafana" \
GF_PATHS_HOME="/usr/share/grafana" \
GF_PATHS_LOGS="/var/log/grafana" \
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"

RUN apt-get update && apt-get install -qq -y tar libfontconfig curl ca-certificates && \
mkdir -p "$GF_PATHS_HOME/.aws" && \
curl "$GRAFANA_URL" | tar xfvz - --strip-components=1 -C "$GF_PATHS_HOME" && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
groupadd -r -g $GF_GID grafana && \
useradd -r -u $GF_UID -g grafana grafana && \
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
"$GF_PATHS_PROVISIONING/dashboards" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \
cp "$GF_PATHS_HOME/conf/sample.ini" "$GF_PATHS_CONFIG" && \
cp "$GF_PATHS_HOME/conf/ldap.toml" /etc/grafana/ldap.toml && \
chown -R grafana:grafana "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" && \
chmod 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS"

RUN apt-get update && apt-get -y install wget && \
wget -qO - https://openresty.org/package/pubkey.gpg | apt-key add - && \
apt-get -y install software-properties-common && \
add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" && \
apt-get update && apt-get -y install openresty && \
rm -rf /var/lib/apt/lists/*

RUN apt-get -yqq update
RUN apt-get install -yqq python
RUN apt-get -yqq install python-pip

EXPOSE 3000

ENV http_proxy=""
ENV https_proxy=""

COPY ./run.sh /usr/local/openresty/nginx/conf/run.sh
COPY ./start-up.sh /start-up.sh
COPY ./grafana.ini /etc/grafana/grafana.ini
COPY ./openresty/nginx.conf /usr/local/openresty/nginx/conf
COPY ./py/* /usr/local/openresty/nginx/conf/
COPY ./plugin/* /var/lib/grafana/plugins


RUN chmod 777 -R /usr/local/openresty/nginx/ && \
chmod 755 /start-up.sh && \
mkdir /usr/local/openresty/nginx/client_body_temp && \
chmod -R 777 /usr/local/openresty/nginx/client_body_temp && \
rm -rf /usr/local/openresty/nginx/logs && mkdir /usr/local/openresty/nginx/logs && \
chmod 777 -R /usr/local/openresty/nginx/logs && \
touch /usr/local/openresty/nginx/logs/error.log && \
chmod 777 /usr/local/openresty/nginx/logs/error.log && \
chmod 777 -R /usr/local/openresty/nginx/conf/ && \
chmod 777 /etc/grafana/grafana.ini


USER grafana
WORKDIR /
ENTRYPOINT [ "/start-up.sh" ]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

annan211

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值