Docker 에서 슈퍼 바 이 저 를 사용 하여 자동 시작 관리(redis&sshd)
http://blog.csdn.net/lsziri/article/details/69389187
2、Dockerfile
# Docker for CentOS 7
#Base image
FROM hfq/centos7:Jurassic
RUN \
wget http://download.redis.io/releases/redis-3.2.8.tar.gz && tar xzf redis-3.2.8.tar.gz \
&& cd redis-3.2.8 && yum -y install tcl && make && make install \
&& mkdir -p /etc/redis/
# supervisor============================= =================================
RUN yum -y install python-setuptools
RUN easy_install supervisor
ADD redis.conf /etc/redis/redis.conf
ADD supervisord.conf /etc/supervisord.conf
EXPOSE 6379
EXPOSE 12007
CMD /usr/bin/supervisord -c /etc/supervisord.conf
############################################### ####################################
# image
#docker build -t hfq/centos7:IceAge .
# container sshd
#docker run -d -P --name hfq/centos7:IceAge
# sshd container
#docker exec -it /bin/bash
#docker rm $(docker ps -a | grep "xxx/jedi:v5" | awk '{print $1}')
#
#docker run -d -P --name hfq-jedi-smq-IceAge hfq/centos7:IceAge
3、시작 설정 슈퍼 visord.conf 오픈
[supervisord]
nodaemon=true
[program:sshd]
command=/usr/sbin/sshd -D
autostart=true
autorestart=true
[program:redis]
command=/usr/local/bin/redis-server /etc/redis/redis.conf
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
용감한 바로 가기 및 우분투 응용 프로그램안녕하세요 여러분, 이 기사에서는 모든 사이트에서 pwa를 생성하고 실행기 응용 프로그램으로 추가하는 방법을 설명하고 싶습니다. 일부 웹사이트는 PWA로 설치를 허용하지 않지만 유사한 애플리케이션을 원합니다. 1. ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.