Skip to content

Latest commit

 

History

History
132 lines (91 loc) · 2.78 KB

docker_basics.md

File metadata and controls

132 lines (91 loc) · 2.78 KB

Updating your Orisi containers

docker pull orisi/oracle

After getting the new image, restart the container. This will fetch every change in the docker container itself.

Other useful commands

ScreenShot

Display logs for a container

docker logs nostalgic_elion

List running containers

docker ps

ScreenShot

See properties of certain container

docker inspect trusting_bardeen

You can use this command to check ip of the container to login via ssh or check where the persistent folder lies.


[{
    "Args": [],
    "Config": {
   
   ..
   
    "Name": "/trusting_bardeen",
    "NetworkSettings": {
        "Bridge": "docker0",
        "Gateway": "172.17.42.1",
        "IPAddress": "172.17.0.32",
        "IPPrefixLen": 16,
        "PortMapping": null,
        "Ports": {
            "22/tcp": null,
            "2523/tcp": null,
            "8333/tcp": null,
            "8444/tcp": null
   
   ..
   
   
    "Volumes": {
        "/disk": "/mnt/sda1/var/lib/docker/vfs/dir/9a92e96d0a9715aa3b3927d82051de46eda88f3d1ad6337509cf84a6020f69b3"
   

Restart container

docker restart trusting_bardeen

Start container

docker start trusting_bardeen

Stop container

docker stop trusting_bardeen

Erase container

docker rm trusting_bardeen

Stop all containers

docker stop $(docker ps -a -q)

Erase all containers

docker rm $(docker ps -a -q)

Why Orisi and Docker?

  • We need a way to separate dev-ops code from Oracle/Client codebase
  • We need to be able to automate and optimize build process
  • There must a simple and fast way to use it on multiple hardware or IAAS platforms
  • There must be a oneliner that runs whole Oracle
docker run orisi/oracle
  • There must be an oneliner to fetch the newest image
docker pull orisi/oracle
  • There must be a way to easily update core Orisi code without interacting/logging into Orisi node
docker restart orisi/oracle
  • There must be an easy way to fastly build Orisi docker image from source
git clone [email protected]:orisi/oracle.git
cd oracle
docker build -t oracle .
  • There must be a way to deploy and test new code fast in multiple scenarios and enviroments

Docker vs Full VM

So let's say you have a container image that is 1GB in size. If you wanted to use a Full VM, you would need to have 1GB times x number of VMs you want. With LXC and AuFS you can share the bulk of the 1.366 GB and if you have 1000 containers you still might only have a little over 1GB of space for the containers OS, assuming they are all running the same OS image.