Last active
November 22, 2017 12:12
-
-
Save tony612/126a4d9bc1bf4332bc463f2cfc5aa468 to your computer and use it in GitHub Desktop.
The right way to use Elixir+Docker in China
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git clone https://github.com/hexpm/hex.git | |
# cd hex | |
# git checkout v0.15.0 | |
# # Add this Dockerfile in the dir | |
# docker build . | |
# # Then you can use the image as your base image to speedup your usage | |
FROM elixir:1.5.2 | |
RUN HEX_MIRROR=https://hexpm.upyun.com mix local.rebar --force \ | |
# rebar3 update should be rerun if you add a new rebar dependence | |
# or upgrade one, which is a little inconvenient | |
&& ~/.mix/rebar3 update | |
COPY . /tmp/hex | |
RUN cd /tmp/hex \ | |
&& mix install \ | |
&& cd \ | |
&& rm -r /tmp/hex | |
RUN mix hex.config mirror_url https://hexpm.upyun.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment