LoginSignup
23
17

More than 5 years have passed since last update.

コマンド実行後もコンテナを起動させ続けるにはtail -f を使うと良い

Last updated at Posted at 2014-10-30

参考

以下の様なDockerfileがある場合、最後にtail -f /dev/nullをつけるとコンテナが起動し続ける。

Dockerfile
FROM centos:centos6

RUN  yum install -y tar sudo
RUN  sed -i -e "s/^Defaults    requiretty/#Defaults    requiretty/" /etc/sudoers
RUN  yum install -y make gcc readline-devel zlib-devel nmap wget
WORKDIR /usr/local/src
RUN  wget -q https://aipo.googlecode.com/files/aipo7020ja_linux64.tar.gz
RUN  tar xzf aipo7020ja_linux64.tar.gz
RUN  tar xzf aipo7020ja_linux/aipo7020.tar.gz
RUN  rm -rf aipo7020ja_linux*
WORKDIR /usr/local/src/aipo/bin
RUN  sh installer.sh > /dev/null
RUN  yum clean all
ENTRYPOINT ./startup.sh && tail -f /dev/null
23
17
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
23
17