sahilpaudel
Unable to add git repo in Mix for alpine elixir
I am trying to build docker with the following Dockerfile
FROM elixir:1.8.2-alpine AS builder
WORKDIR /afterglowcode
COPY . /afterglowcode
ENV USER www-data
ENV GROUP www-data
RUN addgroup -S www-data && adduser -S www-data -G www-data
RUN apk add --no-cache git
RUN git config --global url."https://github.com/".insteadOf "git://github.com/"
RUN apk add --update bash && rm -rf /var/cache/apk/*
RUN export $(cat .env | xargs -0) && \
mix local.hex --force && \
mix local.rebar --force
RUN export $(cat .env | xargs -0) && mix deps.get
RUN export $(cat .env | xargs -0) && mix release
My mix.exs
defp deps do
[
{:phoenix, "~> 1.3.0"},
{:phoenix_pubsub, "~> 1.0"},
{:postgrex, ">= 0.14.0", override: true},
{:phoenix_html, "~> 2.6"},
{:ecto, "~> 3.1"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:cors_plug, "~> 1.2"},
{:ja_serializer, "~> 0.14.0"},
{:sql_dust, path: 'web/modules/sql_dust'},
{:ecto_enum, "~> 1.2"},
{:cowboy, "~> 1.0"},
{:oauth2, "~> 2.0"},
{:joken, "~> 1.1"},
{:libsodium, "~> 0.0.3"},
{:keccakf1600, "~> 0.0.1"},
{:libdecaf, "~> 0.0.1"},
{:flasked, "~> 0.4"},
{:bodyguard, "~> 1.0.0"},
{:httpoison, "~> 0.11.1"},
{:csv, "~> 2.1.1"},
{:secure_random, "~> 0.5"},
{:ex_aws, "~> 2.0"},
{:ex_aws_s3, "~> 2.0.2"},
{:sweet_xml, "~> 0.6.0"},
{:bamboo, "~> 0.8.0"},
{:bamboo_smtp, "~> 1.4.0"},
{:distillery, "~> 2.0", runtime: false},
{:jason, "~> 1.1"},
{:cachex, git: "https://github.com/whitfin/cachex.git"},
{:quantum, "~> 2.3"},
{:timex, "~> 3.0"},
{:oban, "~> 0.2"},
{:mariaex, "0.9.1", override: true},
{:db_connection, "~> 2.0", override: true},
{:ecto_sql, "~> 3.1.0"},
{:plug_cowboy, "~> 1.0"},
{:mustache, "~> 0.3.0"},
{:numerix, "~> 0.5.1"},
{:hackney, github: "benoitc/hackney", override: true},
{:gen_smtp, "~> 0.14.0", override: true}
]
end
Error message
* Getting cachex (https://github.com/whitfin/cachex.git)
fatal: unable to access 'https://github.com/whitfin/cachex.git/': Could not resolve host: github.com
** (Mix) Command "git --git-dir=.git fetch --force --quiet --progress" failed
The command '/bin/sh -c export $(cat .env | xargs -0) && mix deps.get' returned a non-zero code: 1
First Post!
dimitarvp
Where is this run? Seems like it can’t access GitHub which is an error condition.
Popular in Questions
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
As a follow up to my earlier question:
I have the code compiling and running but not getting a successful login from the rest server. ...
New
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
What is most correct way to open, read and parse JSON file with poison?
For example if we have example.json file in root of some projec...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
I have a list say
x = ["23gh", "56kh", "97mh"]
I would like to pass each element to Val in each iteration.
Say, in iteration 1 -------...
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Hi all,
I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I'm trying to use Postg...
New
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
Other popular topics
can someone please explain to me how Enum.reduce works with maps
New
Hello all!
I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I'm writing a test for one of t...
New
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
New







