Docker related

Install docker

sudo apt-get install docker.io

Create docker image

from Dockerfile, cd to repository of Dockerfile

sudo docker build -t [docker-image-name:Tag]  .

Remove docker image

Put in your terminal:

docker ps -a

CONTAINER ID | IMAGE ......................NAMES

d25c0cd9725a |acd33a9490dc ................focused_einstein

You can see your IMAGEID in the column IMAGE. Get the CONTAINER ID an remove the container:

docker rm d25c0cd9725a

And now you can remove the image:

docker rmi acd33a9490dc

 

Run docker image in a container

sudo docker run -it -d [docker-image-name]

Run command line (bash) inside a running commander

sudo docker exec -it [docker-container-ID] bash

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: