GithubHelp home page GithubHelp logo

akarpe / fabric8-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fabric8io/fabric8-docker

0.0 2.0 0.0 1.94 MB

Dockerfiles to create Fuse containers in docker.io

License: Apache License 2.0

Shell 100.00%

fabric8-docker's Introduction

fabric8-docker

This project builds a docker container for running fabric8

Try it out

If you have docker installed you should be able to try it out via

docker pull fabric8/fabric8
docker run --name myfabric -Pit -e DOCKER_HOST=http://192.168.59.103:2375 fabric8/fabric8

Where the value of DOCKER_HOST should be the URL (ideally http) where the docker container can access the Docker Remote API to be able to create/start/stop containers in docker.

To find the port to connect to the web console try:

docker port myfabric 8181

You may wish to replace the 0.0.0.0 address with the actual ip address of your DOCKER_HOST.

You can pass in various environment variables to customise how a fabric is created or joined; or specify stand alone mode if required etc.

In addition, the Docker image allows you to override a few other things through environment variables:

  • ADMIN_USERNAME: the admin username you can use to connect to the Karaf shell as & authenticate to HawtIO (default: admin)
  • ADMIN_PASSWORD: the admin password to use (default: admin)
  • DOCKER_HOST: the URI to the Docker REST endpoint. This is necessary if you want to manage Docker containers from your Docker container :) (default: tcp://172.17.42.1:4243)

You can then run docker attach or docker logs to get the logs at any time.

Run docker ps to see all the running containers or docker inspect $containerID to view the IP address and details of a container

Known issues

  • there is a known issue with the use of boot2docker where permissions are not setup correctly so the fabric8 cannot startup. Works fine on linux though!
  • DOCKER_HOST must point to a TCP / HTTP endpoint for now; we don't yet support using unix sockets to communicate with the Docker REST API.

Using the interactive shell

If you want to run the docker container a bit more like running the bin/fabric8 command where you get an interactive colourful ssh shell on the command line then try this:

docker run -Pit fabric8/fabric8 /home/fabric8/fabric8-karaf/bin/fabric8

Accessing the web console

Find the port that 8181 is exposed from the container to the host via

docker ps

and looking for the text 4XXXX->8181 then find the correct value of 4XXXX.

Then open a browser at http://$HOST:4XXX using the correct value of HOST. If you are on linux then this can be localhost or if you use boot2docker then its the IP adress output via

boot2docker ip

You should now see the fabric8 web console from which you can browse the git repository, running containers and create new containers.

Creating new containers (like Java Containers, Spring Boot, Tomcat, Jetty etc) creates a new docker image on the fly based on the profile metadata and deployment units then starts it up using the Docker Remote API.

Building the docker container locally

We have a Docker Index trusted build setup to automatically rebuild the fabric8/fabric8 container whenever the Dockerfile is updated, so you shouldn't have to rebuild it locally. But if you want to, here's now to do it...

Once you have installed docker you should be able to create the containers via the following:

If you are on OS X then see How to use Docker on OS X.

git clone [email protected]:fabric8io/fabric8-docker.git
cd fabric8-docker
./build.sh

The fabric8 container should then build.

Using a local build

To create a fabric8 using your local build try the following:

docker run -Pit -e DOCKER_HOST=http://192.168.59.103:2375 -e FABRIC8_DOCKER_IMAGE_FABRIC8=fabric8:fabric8 fabric8:fabric8

This will then startup your locally built image fabric8:fabric8 and then use that image when creating any new karaf based containers via the CLI or web console.

Experimenting

To spin up a shell in one of the containers try:

docker run -Pit fabric8/fabric8 /bin/bash

You can then noodle around the container and run stuff & look at files etc.

Docker resources

fabric8-docker's People

Contributors

bitdeli-chef avatar davsclaus avatar jimmidyson avatar jstrachan avatar pires avatar

Watchers

 avatar  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.