-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
97 lines (74 loc) · 2.44 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
ARG buildpack_tag
FROM buildpack-deps:${buildpack_tag}
ARG buildpack_tag
USER root
ENV LANG=C.UTF-8
ENV HOME=/root
RUN if [ "$buildpack_tag" = "stretch" ]; then bash -c "echo 'deb http://archive.debian.org/debian stretch main' > /etc/apt/sources.list"; fi;
RUN apt-get update && apt-get install -y --no-install-recommends \
lsb-release software-properties-common
#
# Clang for JIT.
# C++17 support is needed, and LLVM does not provide a package for it.
#
RUN if [ ! $(lsb_release -cs) = "stretch" ]; then bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"; fi;
#
# ERLANG
#
ENV ERLANG_VERSION="26.2.5.2"
RUN apt-get update &&\
apt-get install -y -q build-essential make &&\
apt-get install -y -q openssl libssl-dev libncurses5-dev &&\
apt-get autoremove -y --purge &&\
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV KERL_URL "https://raw.githubusercontent.com/kerl/kerl/master/kerl"
RUN curl -O -s ${KERL_URL} &&\
chmod a+x kerl &&\
mv kerl /usr/bin
ENV KERL_CONFIGURE_OPTIONS "--with-microstate-accounting=extra \
--without-edoc \
--without-erl_docgen \
--without-ftp \
--without-odbc \
--without-ssh \
--without-ftp \
--without-tftp"
RUN kerl update releases &&\
MAKEFLAGS="-j8" kerl build ${ERLANG_VERSION} ${ERLANG_VERSION} &&\
kerl install ${ERLANG_VERSION} /opt/erlang/${ERLANG_VERSION} &&\
echo ". /opt/erlang/${ERLANG_VERSION}/activate" >> /etc/bash.bashrc &&\
ln -s /opt/erlang/${ERLANG_VERSION}/bin/erl /usr/local/bin/erl &&\
erl -version
#
# ELIXIR
#
ENV ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/releases/download/v1.16.3/elixir-otp-26.zip"
RUN set -xe \
&& buildDeps=' \
unzip \
' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& curl -fSL -o elixir-precompiled.zip $ELIXIR_DOWNLOAD_URL \
&& unzip -d /usr/local elixir-precompiled.zip \
&& rm elixir-precompiled.zip
#
# Hex + Rebar
#
ENV MIX_ENV=prod
RUN mix local.hex --force
RUN mix local.rebar --force
#
# NODE
#
ENV NODE_VERSION="16.13.1"
# install node version manager (nvm)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
ENV NVM_DIR=/root/.nvm
# install node
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
# install yarn
RUN npm install --global yarn