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
How to bind a phoenix app to a specific ip address?
could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
What is the idiomatic way of matching for not nil in Elixir?
E.g.,
First way:
defp halt_if_not_signed_in(conn, signed_in_account) when...
New
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
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 Postgres...
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Other popular topics
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
Hello, how can I check the Phoenix version ?
Thanks !
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set?
Thanks.
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
Got a question about when to concat vs. prepending items to list then reversing to achieve appending.
So i know lists boil down to [1 | ...
New
I would like to know what is the best IDE for elixir development?
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)?
Would
mix ecto.rollback -v 200809061...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









