combining cloudbees ec2 docker image with docker in docker

Am trying to combine docker in docker feature with in cloudbees ecs image.
Both the images are build using different linux based distribution.
Cloudbees ECS slave image is build use base ubuntu 14.04 and docker:1.8-dind is build from base debian:jessie. What is the best way to combine both into one docker image with both features using debian:jessie as the base.

  • After stopping docker containers , previously running containers cannot be started
  • How do you get a VPC Endpoint to work in a Docker container?
  • How to access private Docker repository in OpsWorks ECS Layer?
  • NGINX & Consul-Template in Docker
  • Shiny server inside Docker container reverse proxied with nginx will not follow 301 redirects
  • AWS ECS agent cannot find /etc/resolv.conf when launching and cannot add instances to an ECS cluster
  • Using docker with RDS (Prod), but confused about local DB setup (dev)
  • Solr on Docker:localhost:8983 not working
  • Does “docker-compose down” invoke “docker stop” on each container?
  • WORKDIR $HOME in Dockerfile does not seem to work
  • kubernetes pod can't connect (through service) to self, only to other pod-containers
  • How to use Application Load Balancer for an ECS Service with multiple port mappings?
  • One Solution collect form web for “combining cloudbees ec2 docker image with docker in docker”

    I’ve done something similar in the past and it usually comes down to walking the Dockerfile dependency chain and building up the image that way. In your instance, you’d probably want to start at https://hub.docker.com/r/cloudbees/java-build-tools/~/dockerfile/ and swap out

    FROM ubuntu:15.04
    

    with

    FROM debian:jessie
    

    And build it to see what works and what doesn’t work. Typically it’s a package manager or something that needs to be updated/replaced.

    The downside of this approach is that it can be a lot of trial and error and you end up with giant Dockerfiles, but the upside is that you can usually streamline your image to do exactly what you want without a lot of the Ubuntu extras.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.