New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build context parameter in docker-compose can not be parsed as string #327

Open
mre opened this Issue Nov 2, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@mre

mre commented Nov 2, 2017

Given the following Dockerfile:

FROM debian:jessie

and this docker-compose.yml

services:
  app:
    build: .

I get an error when I run crane up:

ERROR: yaml: unmarshal errors:
  line 3: cannot unmarshal !!str `.` into crane.BuildParameters

The above syntax is valid, according to the official version 2 docker-compose reference.

If I change the docker-compose.yml to look like this, it works:

services:
  app:
    build:
      context: .
@michaelsauter

This comment has been minimized.

Owner

michaelsauter commented Nov 2, 2017

Thanks for the detailed report.

Crane aims to be docker-compose v3 compatible. However, in this case both v2 and v3 are the same, and they do support a string for build, not just an object.

I propose the following:

  1. I'll add the incompatibility to the list of differences between Crane and Docker Compose
  2. Then we can look into allowing a string for build as well.

Do you want to have a look into fixing it? If not, I will have a look at it sometime this month, but it is not top priority as there is a work-around.

@mre

This comment has been minimized.

mre commented Nov 2, 2017

No worries, it's a minor thing. Just wanted to document the behaviour somewhere in case anybody else hits the same issue. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment