nicholasjackson / minke

Tools for building Microservices with Docker
http://nicholasjackson.github.io/minke
MIT License
45 stars 2 forks source link

CWD problem #48

Open alphamichael opened 7 years ago

alphamichael commented 7 years ago

Hey Nic

I discovered Minke doesn't like being run from somewhere other than service/_minke:

drew@beef ~/some-service on master ✔                                                                        [16:36:16]
$ ./_minke/minke
grep: Gemfile: No such file or directory
Running command: minke
docker: Error response from daemon: Container command '/entrypoint.sh' not found or does not exist..

I think this might be a quick fix:

diff --git a/lib/minke/scripts/minke b/lib/minke/scripts/minke
index 11d1e7b..5f822eb 100755
--- a/lib/minke/scripts/minke
+++ b/lib/minke/scripts/minke
@@ -8,6 +8,7 @@ COMMAND=$*
 GEM_VOLUMES=""
 SSH_AUTH=""

+cd $(dirname $0)
 # Forward keys to docker host
 if [[ $1 == "-A" || $2 == "-A" ]]; then
   if [[ "${DOCKER_MACHINE}" != "" ]]; then
drew@beef ~/some-service on master ✔                                                                        [16:36:21]
$ ./_minke/minke
Running command: minke

888b     d888 d8b          888
8888b   d8888 Y8P          888
88888b.d88888              888
888Y88888P888 888 88888b.  888  888  .d88b.
888 Y888P 888 888 888 "88b 888 .88P d8P  Y8b
888  Y8P  888 888 888  888 888888K  88888888
888   "   888 888 888  888 888 "88b Y8b.
888       888 888 888  888 888  888  "Y8888

Version: 1.13.18

registered minke-generator-go

Usage: minke [options] [subcommand [options]]
    -v, --[no-]verbose               Run verbosely

Commonly used command are:
   generate    :     generate a new template
   fetch       :     fetch dependent packages
   build       :     build template
   test        :     run unit tests
   cucumber    :     run cucumber tests
   run         :     start the application
   build_image :     build a docker image
   push        :     push built image to the registry
   encrypt     :     encrypt secrets with a private key
See 'minke COMMAND --help' for more information on a specific command.

:-D

Kind regards Andrew