Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Umbrella App mix docker.build failed #19

Open
kloktech-mark opened this issue Mar 15, 2017 · 5 comments
Open

Umbrella App mix docker.build failed #19

kloktech-mark opened this issue Mar 15, 2017 · 5 comments

Comments

@kloktech-mark
Copy link

Following error displayed when running mix docker.build. I am not sure if this is related to #15 where app and version needs to specified, the referenced distillery's issue, bitwalker/distillery#201

** (FunctionClauseError) no function clause matching in IO.chardata_to_string/1
(elixir) lib/io.ex:445: IO.chardata_to_string(nil)
(elixir) lib/path.ex:475: Path.do_join/3
(elixir) lib/path.ex:470: Path.join/2
(elixir) lib/path.ex:450: Path.join/1
(distillery) lib/mix/lib/releases/archiver.ex:31: Mix.Releases.Archiver.make_tar/1
(distillery) lib/mix/lib/releases/archiver.ex:17: Mix.Releases.Archiver.archive/1
(distillery) lib/distillery/tasks/release.ex:113: Mix.Tasks.Release.run/1
(mix) lib/mix/task.ex:294: Mix.Task.run_task/3

The command '/bin/sh -c mix release --env=prod --verbose' returned a non-zero code: 1
** (MatchError) no match of right hand side value: {%IO.Stream{device: :standard_io, line_or_bytes: :line, raw: false}, 1}
lib/mix_docker.ex:153: MixDocker.system!/2
lib/mix_docker.ex:123: MixDocker.with_dockerfile/2
lib/mix_docker.ex:18: MixDocker.build/1
(mix) lib/mix/task.ex:294: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2

@teamon
Copy link
Contributor

teamon commented Apr 4, 2017

@linmark333 Please try current master (f5c504f)

/cc @lpil this might also solve your umbrella issues

@jeremytregunna
Copy link

jeremytregunna commented Apr 20, 2017

@teamon I've also run into this problem in my umbrella app, and have retried using master. I get the same error from master.

Output:

The command '/bin/sh -c mix release --env=prod --verbose' returned a non-zero code: 1
** (MatchError) no match of right hand side value: {%IO.Stream{device: :standard_io, line_or_bytes: :line, raw: false}, 1}
    lib/mix_docker.ex:180: MixDocker.system!/2
    lib/mix_docker.ex:150: MixDocker.with_dockerfile/2
    lib/mix_docker.ex:20: MixDocker.build/1
    (mix) lib/mix/task.ex:294: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2

Edit

To provide a bit more information, above that error and stack trace, I get some other errors:

Step 12/12 : RUN mix release --env=prod --verbose
 ---> Running in fac10e2b1e53
fatal: Not a git repository (or any of the parent directories): .git

That Not a git repository error repeats a number of times. Finally, some dependency errors which is really weird to me…

Unchecked dependencies for environment prod:
* amqp (Hex package)
  the dependency is not available, run "mix deps.get"

It lists all my app's dependencies there, not just a couple.

These errors only happen when running a mix docker.build

@joshuataylor
Copy link

It's because in the Dockerfile.build, the mix.exs and mix.lock is copied, but I believe this won't work for an umbrella app, as this will require apps etc as well?

@jeremytregunna
Copy link

jeremytregunna commented May 11, 2017

I manually copy all the apps as well. I don't recall how I worked around this issue, but I since have. Not helpful I know, so my apologies about that.

EDIT: To clarify, I copy the mix.exs's from the apps, and their respective configs.

@joshuataylor
Copy link

@jeremytregunna yeah, did the same and works. Testing now, this is awesome :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants