I would not have reported this here, but I am out of any solution, try to have a Docker file with:
Ubuntu 16.04 LTS
Node 8.x
Elixir Latest
Phoenix Latest
Complete installation
Step 6/11 : RUN mix do deps.get, compile, test
---> Running in c3ae59d0ca9f
warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
Could not find Hex, which is needed to build dependency :phoenix
Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn] ** (Mix) Could not find an SCM for dependency :phoenix from Nexus.Mixfile
ERROR: Service 'nexus' failed to build: The command '/bin/sh -c mix do deps.get, compile, test' returned a non-zero code: 1
md5-0b0ae48c98c314e77f0e1259be86a0d4
#!/bin/bash
set -e
export APP=nexus
export USER=${APP}
export GROUP=${USER}
export HOME=/home/${USER}
export DEPLOYPATH=${HOME}/runtime
export NODE_ENV=testing
export DEBIAN_FRONTEND=noninteractive
export MIX_ENV=test
useradd --user-group --create-home --shell /bin/bash ${USER}
mkdir -p ${DEPLOYPATH}/node_modules
cd ${DEPLOYPATH}
apt-get update -y && apt-get upgrade -y
apt-get install curl wget apt-utils locales ca-certificates git unzip apt-transport-https lsb-release -y --no-install-recommends
update-ca-certificates
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales --force
wget "https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb" --no-check-certificate
dpkg -i erlang-solutions_1.0_all.deb
curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install nodejs elixir -y --no-install-recommends
wget "https://s3.amazonaws.com/s3.hex.pm/installs/list.csv" --no-check-certificate
mix archive.install 'https://hex.pm/installs/hex.ez' --force
mix local.hex --force && mix local.rebar --force
md5-575d4a26ac982947242ce47d681da483
FROM ubuntu:16.04
ADD . /home/nexus/runtime
WORKDIR /home/nexus/runtime
RUN bash provision.sh
RUN mix do deps.get, compile, test
RUN npm install
RUN chown nexus:nexus -R .
USER nexus
EXPOSE 8081
CMD ["npm", "start"]
Please use the ElixirForum or StackOverflow for questions/help, where a wider community will be able to help you. We reserve the issues tracker for issues only. Thank you!
@iongion Did you ever find a solution to this? I'm getting the same error, and this is the only similar thing Google has led me too.
maybe this helps: http://jaredmarkell.com/docker-and-locales/
I just ran into a similar issue that led me here. In my case the issue was that MIX_HOME was undefined, which causes it to get set dynamically during runtime execution.
As such, provisioning within my Dockerfile happened within a different execution context than the running USER, so the first runtime call to mix will have a distinct MIX_HOME and immediately fail to to hex being "missing".
It's a pretty easy fix:
--- a/Dockerfile
+++ b/Dockerfile
FROM elixir:1.7.4-alpine
+ ENV MIX_HOME=/opt/mix
RUN mix local.hex --force
...
Most helpful comment
I just ran into a similar issue that led me here. In my case the issue was that
MIX_HOMEwas undefined, which causes it to get set dynamically during runtime execution.As such, provisioning within my
Dockerfilehappened within a different execution context than the runningUSER, so the first runtime call tomixwill have a distinctMIX_HOMEand immediately fail to to hex being "missing".It's a pretty easy fix: