Open eubnara opened 7 years ago
https://forums.docker.com/t/any-simple-and-safe-way-to-start-services-on-centos7-systemd/5695/8
RUN yum install -y initscripts # for old "service"
http://rpmfind.net/linux/rpm2html/search.php?query=initscripts
위의 사이트에서 rpm package 에 관한 정보를 검색할 수 있는 것 같다.
아래는 centos7 docker image 에서 yum install initscripts
를 실행시켰을 때의 모습이다.
[root@9bc8c53acc2a etc]# yum install initscripts
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: ftp.yz.yamagata-u.ac.jp
* extras: ftp.yz.yamagata-u.ac.jp
* updates: ftp.yz.yamagata-u.ac.jp
(1/2): base/7/x86_64/primary_db | 5.6 MB 00:00:05
(2/2): updates/7/x86_64/primary_db | 7.8 MB 00:00:12
Resolving Dependencies
--> Running transaction check
---> Package initscripts.x86_64 0:9.49.37-1.el7_3.1 will be installed
--> Processing Dependency: sysvinit-tools >= 2.87-5 for package: initscripts-9.49.37-1.el7_3.1.x86_64
--> Processing Dependency: iproute for package: initscripts-9.49.37-1.el7_3.1.x86_64
--> Running transaction check
---> Package iproute.x86_64 0:3.10.0-74.el7 will be installed
--> Processing Dependency: libmnl.so.0(LIBMNL_1.0)(64bit) for package: iproute-3.10.0-74.el7.x86_64
--> Processing Dependency: libxtables.so.10()(64bit) for package: iproute-3.10.0-74.el7.x86_64
--> Processing Dependency: libmnl.so.0()(64bit) for package: iproute-3.10.0-74.el7.x86_64
---> Package sysvinit-tools.x86_64 0:2.88-14.dsf.el7 will be installed
--> Running transaction check
---> Package iptables.x86_64 0:1.4.21-17.el7 will be installed
--> Processing Dependency: libnfnetlink.so.0()(64bit) for package: iptables-1.4.21-17.el7.x86_64
--> Processing Dependency: libnetfilter_conntrack.so.3()(64bit) for package: iptables-1.4.21-17.el7.x86_64
---> Package libmnl.x86_64 0:1.0.3-7.el7 will be installed
--> Running transaction check
---> Package libnetfilter_conntrack.x86_64 0:1.0.6-1.el7_3 will be installed
---> Package libnfnetlink.x86_64 0:1.0.1-4.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================
Installing:
initscripts x86_64 9.49.37-1.el7_3.1 updates 432 k
Installing for dependencies:
iproute x86_64 3.10.0-74.el7 base 618 k
iptables x86_64 1.4.21-17.el7 base 426 k
libmnl x86_64 1.0.3-7.el7 base 23 k
libnetfilter_conntrack x86_64 1.0.6-1.el7_3 updates 55 k
libnfnetlink x86_64 1.0.1-4.el7 base 26 k
sysvinit-tools x86_64 2.88-14.dsf.el7 base 63 k
Transaction Summary
==========================================================================================================================================
Install 1 Package (+6 Dependent packages)
Total download size: 1.6 M
Installed size: 4.6 M
Is this ok [y/d/N]:
initscripts x86_64 9.49.37-1.el7_3.1
위 부분을 볼 수 있는데, 이 링크를 참조하면, 해당 버전에 대한 설명을 볼 수 있다.
https://github.com/CentOS/sig-cloud-instance-images/issues/28
RUN yum -y install initscripts && yum clean all
무언가 초기화하는 스크립트 인 것 같은데 내용은 자세히 모르겠다. Dockerfile 에 명시하곤 한다.