stelligent / mu

A full-stack DevOps on AWS framework
https://getmu.io
MIT License
974 stars 134 forks source link

docker daemon: Cannot locate specified Dockerfile #444

Open 0markill opened 5 years ago

0markill commented 5 years ago

Hi, ive been facing an issue with the relative path of a dockerfile, when i run my configuration i get Dockerfile found, assuming ECR pipeline from mu but right after it fails with the message func1 ▶ ERROR Error response from daemon: Cannot locate specified Dockerfile: Dockerfile

heres my config:

service:
  port: 80
  pathPatterns:
  - /*
  healthEndpoint: /
  name: docs
  desiredCount: 2
  dockerfile: ./docker/docs/Dockerfile
  protocol: HTTP
  targetCPUUtilization: 50
  minSize: 1
  maxSize: 4
  deploymentStrategy: rolling
  environment:
    ENV: staging
    PORT: 80

any help is appreciated. thanks

0markill commented 5 years ago

update: in common/docker.go: func ImageBuild the Dockerfile: relDockerfile, option is not passed in so it always defaults to Dockerfile for the build

0markill commented 5 years ago

will be sending in a pull request for the bugfix soon:

Version of mu: 1.5.10 Platform (Linux, OS X, Windows): Linux (Ubuntu 18.04) The complete mu.yml file used:

namespace: gigi
environments:
  - name: staging
    provider: ecs-fargate
    cluster:
      keyName: bastionhost

service:
  port: 80
  pathPatterns:
  - /*
  healthEndpoint: /
  # What namespace to use for service discovery (default <environment>.<namespace>.local)
  name: docs
  desiredCount: 2
  dockerfile: ./docker/docs/Dockerfile
  protocol: HTTP
  targetCPUUtilization: 50
  minSize: 1
  maxSize: 4
  deploymentStrategy: rolling
  environment:
    ENV: staging
    PORT: 80

The complete command that was executed: mu -p gigi-staging service push -t v0.0.1 Any output from the command:

Dockerfile found, assuming ECR pipeline
Upsert repo for service 'docs'
  Updated stack 'gigi-repo-docs'
Building service:'docs' as image:632223924262.dkr.ecr.ap-southeast-1.amazonaws.com/gigi-docs:v0.0.1'
func1 ▶ ERROR  Error response from daemon: Cannot locate specified Dockerfile: Dockerfile
func1 ▶ ERROR  

Details of the expected results and how they differed from the actual results: Dockerfile should be possible to be built from a relative path, it doesnt.