facebook twitter hatena line email

「仮想サーバ/docker/Dockerfile」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(ページの作成:「==Dockerfileを使ってdocker imageを作る== $ vi Dockerfile FROM centos:centos7 $ docker build -t name1:tag1 . $ docker images REPOSITORY TAG...」)
 
行2: 行2:
 
  $ vi Dockerfile
 
  $ vi Dockerfile
 
  FROM centos:centos7
 
  FROM centos:centos7
 +
RUN ["yum",  "-y", "install", "nginx"]
 
  $ docker build -t name1:tag1 .
 
  $ docker build -t name1:tag1 .
 
  $ docker images
 
  $ docker images

2017年4月27日 (木) 19:25時点における版

Dockerfileを使ってdocker imageを作る

$ vi Dockerfile
FROM centos:centos7
RUN ["yum",  "-y", "install", "nginx"]
$ docker build -t name1:tag1 .
$ docker images
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
centos                centos7             a8493f5f50ff        2 weeks ago         192 MB
name1                tag1                 a8493f5f50ff        2 weeks ago         192 MB