Skip to main content

Commit a file to a Docker image

Commit a file to a Docker image

List available docker images

docker images

List of Docker images on the Vagrant host
vagrant@vagrant:~/project$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
terry/js            latest              72bd945a5a41        About an hour ago   644.1 MB
ubuntu              15.10               2804d41e7f10        6 weeks ago         133.5 MB

Show docker processes of any running docker images
A docker process must be running to commit changes to a docker image
docker ps

No docker images are running
vagrant@vagrant:~/project$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
vagrant@vagrant:~/project$

Start a docker image
docker run -t -i terry/js /bin/bash

Start a Linux docker image and get a directory listing
vagrant@vagrant:~/project$ docker run -t -i terry/js /bin/bash
root@a3d2ae84d527:/app# ll
total 28
drwxr-xr-x  4 root root 4096 Jan 24 15:33 ./
drwxr-xr-x 60 root root 4096 Jan 24 15:34 ../
-rwxrwxrwx  1 root root  238 Jan 21 18:43 .bowerrc*
drwxr-xr-x  4 root root 4096 Jan 23 03:31 app/
-rwxrwxrwx  1 root root  524 Jan 21 16:46 bower.json*
drwxr-xr-x  2 root root 4096 Jan 23 03:31 html/
-rwxrwxrwx  1 root root  233 Jan 21 16:46 package.json*
root@a3d2ae84d527:/app# 

List running Docker images
docker ps

A docker process of a3d2ae84d527 is running
vagrant@vagrant:~/project$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
a3d2ae84d527        terry/js            "/bin/bash"         5 seconds ago       Up 5 seconds        8080/tcp            condescending_banach
vagrant@vagrant:~/project$

Add a file to the docker image 'terry/js' and exit
touch HelloWorld.txt

The file 'HelloWorld.txt' is added to docker image, 'terry/js' but not 'committed'
The file 'HelloWorld.txt' will be deleted from docker image 'terry/js' if 'terry/js' is started in a new process
root@a3d2ae84d527:/app# touch HelloWorld.txt
root@a3d2ae84d527:/app# ll
total 28
drwxr-xr-x  4 root root 4096 Jan 24 15:34 ./
drwxr-xr-x 61 root root 4096 Jan 24 15:34 ../
-rwxrwxrwx  1 root root  238 Jan 21 18:43 .bowerrc*
-rw-r--r--  1 root root    0 Jan 24 15:34 HelloWorld.txt
drwxr-xr-x  4 root root 4096 Jan 23 03:31 app/
-rwxrwxrwx  1 root root  524 Jan 21 16:46 bower.json*
drwxr-xr-x  2 root root 4096 Jan 23 03:31 html/
-rwxrwxrwx  1 root root  233 Jan 21 16:46 package.json*
root@a3d2ae84d527:/app# 

Commit the 'HelloWorld.txt' file in the 'terry/js' docker image in the process a3d2ae84d527
The docker process a3d2ae84d527 must be running

docker commit a3d2ae84d527 terry/js

Docker image 'terry/js' committed the file 'HelloWorld.txt' added
vagrant@vagrant:~/project$ docker commit a3d2ae84d527 terry/js
72bd945a5a410cbe32afa4a3725d8fdb51d1960ebb4c92d476cd9bc6d03b6159

Exit docker and kill the docker process a3d2ae84d527
root@a3d2ae84d527:/app# exit

Confirm that the docker process a3d2ae84d527 has stopped
vagrant@vagrant:~/project$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
vagrant@vagrant:~/project$

Confirm that 'HelloWorld.txt' committed successfully and start a new docker process 5943d4046820
vagrant@vagrant:~/project$ docker run -t -i terry/js /bin/bash
root@5943d4046820:/app# ll
total 28
drwxr-xr-x  4 root root 4096 Jan 24 15:34 ./
drwxr-xr-x 61 root root 4096 Jan 24 15:35 ../
-rwxrwxrwx  1 root root  238 Jan 21 18:43 .bowerrc*
-rw-r--r--  1 root root    0 Jan 24 15:34 HelloWorld.txt
drwxr-xr-x  4 root root 4096 Jan 23 03:31 app/
-rwxrwxrwx  1 root root  524 Jan 21 16:46 bower.json*
drwxr-xr-x  2 root root 4096 Jan 23 03:31 html/
-rwxrwxrwx  1 root root  233 Jan 21 16:46 package.json*
root@5943d4046820:/app# exit

Open two SSH sessions to the Vagrant guest.

SSH session 1 to do work in the Docker image in the Vagrant Linux guest

A SSH session 2 to do work in the Vagrant Linux guest

Comments

Popular posts from this blog

clonezilla - creating a wifi ad-hoc hotspot and running a ssh server

Here are some notes on connecting to a wifi-hotspot from a running clonezilla
live-cd.

[ target machine to save a backup hard-disk clone/image ]
[ target machine is also running a wifi hotspot and an ssh server ]
Ubuntu 11.04 - Natty Narwhal

terry@terry-HP:~$ uname -a
Linux terry-HP 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
terry@terry-HP:~$

[ Creating an 'ad-hoc' wifi spot ]
Click the 'up down arrow' icon ( or what have you )


[ choose menu item to create a wifi ad-hoc hotspot ]

[ create the ad-hoc wifi hotspot ]

[ the eth1 connection is the created ad-hoc network with an essid of 'terry' ]

[ the ad-hoc wifi hotspot is now visible on the 'host' computer and other computer as well now ]

[ enter the following on the machine being cloned with clonezilla
[ at the appropriate place in the clonezilla backup image step ]
terry@terry-HP:~$ ip link set wlan0 down
terry@terry-HP:~$ iwconfig wlan0 mode ad-hoc
terry@…

Translators, maps, conduits, and containers

Interpreters
The Amiga had a hardware emulator which transformed instruction to instruction to a dedicated x86 hardware interpreter in the Amiga could run Microsoft DOS spreadsheet programs in the Amiga OS.

MS-DOS on Amiga via Sidecar or Bridgeboard[edit]
MS-DOS compatibility was a major issue during the early years of the Amiga's lifespan in order to promote the machine as a serious business machine. In order to run the MS-DOS operating system, Commodore released the Sidecar for the Amiga 1000, basically a 8088 board in a closed case that connected to the side of the Amiga. Clever programming (a library named Janus, after the two-faced Roman god of doorways) made it possible to run PC software in an Amiga window without use of emulation. At the introduction of the Sidecar the crowd was stunned to see the MS-DOS version of Microsoft Flight Simulator running at full speed in an Amiga window on the Workbench.

Later the Sidecar was implemented on an expansion card named "Bridgebo…

Use Gwenview to upload images to picasaweb.google.com

Use Gwenview to upload images to https://picasaweb.google.com/

install the following KDE4 plugins:

terry@narwhal:~/download$ sudo apt-get install kipi-plugins
From Linux Clicks...
the Gwenview application...

From Linux Clicks...