chaosblade 软件包下载

https://github.com/chaosblade-io/chaosblade/releases/tag/v1.3.0

dockerifle 编写

将下载的 chaosblade 放到与 dockerfile 同层目录,并拷贝进容器。
# Reference URL:https://arthas.aliyun.com/doc/docker.html
# Reference URL:https://github.com/goyalzz/Ubuntu-Java-8-Maven-Docker-Image/blob/master/Dockerfile
# Reference URL:https://github.com/krallin/tini

# 安装工具说明
# ttf-dejavu fontconfig 中文字体
# language-pack-zh-hans 中文字符
# net-tools 网络工具
# arthas 阿里诊断工具

FROM ubuntu:18.04

MAINTAINER rj <ruijin>
LABEL Description="jdk:1.8.0_292-8u292-b10-0ubuntu1~18.04-b10"

ENV LANG C.UTF-8
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64

COPY chaosblade-1.3.0 /usr/local/chaosblade

# 引入阿里 arthas 诊断工具
COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas

ENV TINI_VERSION v0.19.0
#ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini
COPY tini /sbin/tini

RUN chmod +x /sbin/tini

RUN groupadd --system --gid 1000 appuser && useradd -r -s /bin/bash -g appuser -u 1000 -d /home/appuser appuser && \
    chown -R appuser:appuser /opt && \
    chown -R appuser:appuser /usr && \
    chown -R appuser:appuser /home/appuser && \
    chown -R appuser:appuser /usr/local/chaosblade && \
    chmod -R a+rwx /usr/local/chaosblade && \
    apt-get update && \
    apt-get install -y tzdata && \
    apt-get install -y --no-install-recommends openjdk-8-jdk curl telnet vim ttf-dejavu fontconfig net-tools language-pack-zh-hans && \
    apt-get install -y iputils-ping && \
    apt-get clean && \
    rm /etc/localtime && \
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo 'Asia/Shanghai' >/etc/timezone  && \
    locale-gen zh_CN.UTF-8

ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-8-openjdk-amd64/bin:/usr/local/chaosblade:/usr/local/chaosblade/bin

USER appuser
WORKDIR /home/appuser

ENTRYPOINT ["/sbin/tini", "--"]

点赞(1) 打赏

评论列表 共有 0 条评论

暂无评论
立即
投稿
发表
评论
返回
顶部