zoukankan      html  css  js  c++  java
  • dockerfile

    FROM openjdk:8u191-jdk-alpine3.9
    MAINTAINER Tony
    
    RUN  echo 'http://mirrors.aliyun.com/alpine/latest-stable/main' > /etc/apk/repositories 
    && echo 'http://mirrors.aliyun.com/alpine/latest-stable/community' >>/etc/apk/repositories 
    && apk update && apk add tzdata 
    && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime  
    && echo "Asia/Shanghai" > /etc/timezone
    RUN apk add --update curl && apk add bash && apk add curl && apk --no-cache add tini
    
    # Install ssh
    RUN apk add --no-cache openssh-server && apk add --no-cache openssh-client && 
        cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && 
        sed -i "s/#PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config && 
        ssh-keygen -t rsa -P "" -f /etc/ssh/ssh_host_rsa_key && 
        ssh-keygen -t ecdsa -P "" -f /etc/ssh/ssh_host_ecdsa_key && 
        ssh-keygen -t ed25519 -P "" -f /etc/ssh/ssh_host_ed25519_key && 
        echo "root:root" | chpasswd
    
    # Install language pack
    COPY ./sgerrand.rsa.pub /etc/apk/keys/sgerrand.rsa.pub
    
    COPY ./glibc-2.25-r0.apk /glibc-2.25-r0.apk
    RUN apk add glibc-2.25-r0.apk && 
        rm /glibc-2.25-r0.apk
    
    COPY ./glibc-bin-2.25-r0.apk /glibc-bin-2.25-r0.apk
    RUN apk add glibc-bin-2.25-r0.apk && 
        rm /glibc-bin-2.25-r0.apk
    
    COPY ./glibc-i18n-2.25-r0.apk /glibc-i18n-2.25-r0.apk
    RUN apk add glibc-i18n-2.25-r0.apk && 
        rm /glibc-i18n-2.25-r0.apk
    
    # Note that locale -a is not available in alpine linux, use `/usr/glibc-compat/bin/locale -a` instead
    COPY ./locale.md /locale.md
    RUN cat locale.md | xargs -i /usr/glibc-compat/bin/localedef -i {} -f UTF-8 {}.UTF-8
    
    # Set the lang
    ENV LANG=en_US.UTF-8 
        LANGUAGE=en_US.UTF-8
    
    # Set JAVA Home
    RUN echo "export PATH=$PATH:/usr/lib/jvm/java-1.8-openjdk/bin" >> /etc/profile 
    && source /etc/profile
    
    # Expose 22 port
    EXPOSE 22
    
    # Retart ssh
    CMD [ "/usr/sbin/sshd"]
    所有的悲情叙事,都是因为你的基础体能不够
  • 相关阅读:
    Eclipse连接MySQL数据库(傻瓜篇)
    JMeter监控内存及CPU ——plugin插件监控被测系统资源方法
    fiddler抓取手机端的数据流量包
    python 字典(dictionary)一些方法
    python 循环语句
    Charles 抓 HTTPS 包
    python RSA 加密与签名
    从零开始做一个Jmeter性能测试
    [python之路]变量和字符编码
    [python之路]简单介绍
  • 原文地址:https://www.cnblogs.com/gaoyuechen/p/14452789.html
Copyright © 2011-2022 走看看