Giter VIP home page Giter VIP logo

docker's Introduction

Docker Development Environment

Getting started

  1. Clone the repository.
git clone https://github.com/kiltlifter/docker.git
  1. Build the Docker image.
sudo docker build -t centos6-devbox docker/centos/Dockerfile
  1. Start a Docker container
sudo docker run -d -P --name devbox centos6-devbox
  1. ssh into your container (password is "docker")
ssh -p $(sudo docker inspect devbox | sed -rn 's/"HostPort":\s"(.*)"/\1/p') docker@localhost

Stopping containers

  • Stopping the devbox container
sudo docker stop devbox
  • If you didn't name your container devbox or don't know the container name, stop the first one.
sudo docker stop $(sudo docker ps | awk '{if (NR>1&&NR<3) {print $1}}')
  • To stop all containers
sudo docker stop $(sudo docker ps | awk '{if (NR>1) {print $1}}')

Destroying containers

  • Destroying the devbox container
sudo docker rm devbox

Removing this image

  • Destroying the devbox image
sudo docker rmi centos6-devbox
  • To remove all images
sudo docker rmi $(sudo docker images | awk '{if (NR>1) {print $3}}')

docker's People

Watchers

Sean Douglas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.