-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62e09fb
commit bf575af
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.formatter.exs | ||
.git/ | ||
.gitignore | ||
Dockerfile | ||
Dockerfile | ||
README.md | ||
_build/ | ||
deps/ | ||
test/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
FROM erlang:20.3 | ||
|
||
ENV ELIXIR_VERSION="v1.6.4" \ | ||
RUST_VERSION="1.25.0" \ | ||
LANG="C.UTF-8" \ | ||
MIX_ENV="prod" \ | ||
HOME=/opt/app | ||
|
||
WORKDIR $HOME | ||
|
||
RUN apt-get update && \ | ||
apt-get install \ | ||
ca-certificates \ | ||
curl \ | ||
gcc \ | ||
libc6-dev \ | ||
libusb-1.0-0-dev \ | ||
psmisc \ | ||
-qqy \ | ||
--no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Elixir | ||
RUN set -xe \ | ||
&& ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" \ | ||
&& curl -fSL -o elixir-src.tar.gz $ELIXIR_DOWNLOAD_URL \ | ||
&& mkdir -p /usr/local/src/elixir \ | ||
&& tar -xzC /usr/local/src/elixir --strip-components=1 -f elixir-src.tar.gz \ | ||
&& rm elixir-src.tar.gz \ | ||
&& cd /usr/local/src/elixir \ | ||
&& make install clean | ||
|
||
# Install Hex | ||
RUN mix do local.hex --force, local.rebar --force | ||
|
||
# Install Rust | ||
RUN RUST_ARCHIVE="rust-$RUST_VERSION-x86_64-unknown-linux-gnu.tar.gz" && \ | ||
RUST_DOWNLOAD_URL="https://static.rust-lang.org/dist/$RUST_ARCHIVE" && \ | ||
mkdir -p /rust \ | ||
&& cd /rust \ | ||
&& curl -fsOSL $RUST_DOWNLOAD_URL \ | ||
&& curl -s $RUST_DOWNLOAD_URL.sha256 | sha256sum -c - \ | ||
&& tar -C /rust -xzf $RUST_ARCHIVE --strip-components=1 \ | ||
&& rm $RUST_ARCHIVE \ | ||
&& ./install.sh | ||
|
||
COPY . . | ||
|
||
RUN mix do deps.get, deps.compile, compile.rustler | ||
|
||
CMD ["iex", "-S", "mix"] |
This file contains 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