ご覧いただきありがとうございます。
現在、JDK6とtomcat6をインストールしたdockerイメージを作成するために
Dockerfileを作成しています。
Apacheもインストールしたので稼働確認ができるように
systemctlコマンドを使えるようにしたいです
FROM centos:7 WORKDIR /opt RUN tar xvfz apache*.tar.gz RUN useradd -s /sbin/nologin tomcat RUN chown -R tomcat:tomcat /opt/apache-tomcat-6.0.53 RUN yum install -y java-1.6.0-openjdk RUN java -version RUN yum -y install httpd RUN chkconfig httpd on EXPOSE 8080 RUN export -p RUN /opt/apache-tomcat-6.0.53/bin/startup.sh
コンテナを作成する際に--privilegedのオプションと
/sbin/initの実行でsystemctlコマンドを使えるようにしようとしましたが
docker run -it -d --privileged -p 18080:80 newcontainer centos:7 /sbin/init
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "centos:7": executable file not found in $PATH: unknown.
のエラーが出てしまいます。
他にsystemctlコマンドを使えるようにする方法はあるでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2022/06/27 11:56