Git Product home page Git Product logo

docker2docker's Introduction

Docker-in-Docker: back with a vengeance

This recipe lets you run Docker-in-Docker, with a twist. Instead of nesting containers, it runs a virtual machine within Docker, and it uses boot2docker to run Docker within that virtual machine.

It's using KVM to start the virtual machine, so it is intended for people running Docker on bare metal. Nested virtualization might or might not work, or be just a pipe dream, I don't know.

How to use this

Clone 'dat repo. Build it. Run in --privileged mode on a Linux machine with KVM support. Check the IP address of the container; then you can connect using:

  • SSH on port 22 (user=docker, password=tcuser)
  • Docker on port 4243
  • VNC on port 5900

Persistence

If you bind-mount an empty file on /boot2docker.hdd, it will be turned into a 10 GB sparse file and formated as an ext4 filesystem and used as the data volume for boot2docker. If you want something larger/smaller, just format it yourself, and make sure that the label is boot2docker-data.

docker2docker's People

Contributors

jpetazzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker2docker's Issues

can not ssh into container

I have downloaded the boot2docker.iso and trusty-server-cloudimg-amd64-disk1.img to the Dockerfile folder, and modify the Dockerfile as below:

FROM ubuntu:14.04
RUN apt-get update -q
RUN apt-get install -qy qemu-kvm socat curl dnsmasq iptables cloud-utils
RUN mkdir -p /cache
#RUN curl -L https://github.com/boot2docker/boot2docker/releases/download/v0.8.0/boot2docker.iso >/cache/boot2docker.iso
#RUN curl -L http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img >/cache/trusty.img
COPY boot2docker.iso /cache/boot2docker.iso
COPY trusty-server-cloudimg-amd64-disk1.img /cache/trusty.img
RUN ln -s /cache/trusty.img /system.img
ADD bin /usr/local/bin
EXPOSE 22/tcp 4243/tcp 5900/tcp
CMD kvm-start

then I build the image as below:
dc build -t etworker/docker2docker2 .

then I run it as below:
dc run -P -it --privileged etworker/docker2docker

Every steps above seems ok.

Now I want to ssh into the container which IP is 172.17.0.2,
ssh [email protected]

and input the password tcuser, but seems the password is wrong.

I have also tried docker as password, failed again.

Could you please help me why the password is not ok? thanks!

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.