Saturday, June 6, 2015

Using DockerFile to create an image

Each line in Dockerfile creates a layer. An image can have a max of 127 layers

Create a Dockerfile in a new folder.

> vi Dockerfile

Paste the following inside the Dockerfile

# this is a comment
FROM ubuntu:14.04
MAINTAINER Kenneth
RUN apt-get update && apt-get install
RUN gem install json

Build the image

> docker build -t kenneth/sinatra:v2 .

Tag the image

> docker tag ouruser/sinatra:dev

No comments:

Post a Comment