From 570f47f500a40b767cbc2d8d0776816aab0f0691 Mon Sep 17 00:00:00 2001 From: Luigi Zuccarelli Date: Sun, 23 Oct 2016 20:37:26 +0100 Subject: [PATCH] Title: Updated Dockerfile to allow for simple entry point start and updated the README Motivation: Allow the local developer to build and execute docker container locally Resolution: Added simple instructions in the README Ticket: USM-20 --- Dockerfile | 4 ++-- README.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cee6ea5..87ae856 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -FROM docker.io/microlib/golang-base:1.2 +FROM docker.io/microlib/golang-base:1.7 # This will change depending on each microservice entry point # This will change to the binary start in production based images -CMD ["/bin/sh", "go run main.go"] +CMD ["/usr/local/go/bin/go", "run", "main.go"] diff --git a/README.md b/README.md index bcf7b76..8cf43af 100644 --- a/README.md +++ b/README.md @@ -119,4 +119,23 @@ none } ``` +## Develeopment + +To build an image locally execute the following script + +``` +docker build -t usermanager:dev . + +``` + + +To execute it run the following script + +``` +docker run -it --name usermanager -v //src/github.com/microlib/usermanager/:/go --privileged + +``` + + + [![Coverage Status](https://coveralls.io/repos/github/microlib/usermanager/badge.svg?branch=master)](https://coveralls.io/github/microlib/usermanager?branch=master)