From 4a876fa826fb54625db40946abb4f7d334bcbca6 Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Thu, 11 Dec 2014 09:45:17 -0500 Subject: [PATCH] Update README.md --- README.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 928f2d1..22f663e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,32 @@ -##freehub +#freehub **BikeBike Docker Container Image for freehub** -Member and shop visit [application](https://github.com/asalant/freehub/wiki) implemented in Rails by the [San Francisco Bike Kitchen](http://bikekitchen.org/). +Freehub is a member and shop visit [application](https://github.com/asalant/freehub/wiki) implemented in Rails by the [San Francisco Bike Kitchen](http://bikekitchen.org/). +##Pull the repository + +``` +docker pull bikebike/bikebike +``` + + +##Run the docker container + +Publish the container's port to the host: + +>format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort + + +``` +docker run -d -p 3000:3000 --name="freehub" bikebike/freehub +``` + +##How to test/develop inside the running container process + +This method uses [nsenter](http://jpetazzo.github.io/2014/06/23/docker-ssh-considered-evil/). Check out [jpetazzo/nsenter](https://github.com/jpetazzo/nsenter) on GitHub. + +``` +sudo PID=$(docker inspect --format {{.State.Pid}} ) +sudo nsenter --target $PID --mount --uts --ipc --net --pid +```