erlang 26 和 elixir 1.14.4 的centos 7 docker镜像
$ cd ~/proj/myapp
$ docker run -it --rm -v "$(pwd):/im_deploy" cameron123kkj/ex_deploy:1.14.4 bash
[root@97475711e244 im_deploy]#
mix deps.get --only prod
MIX_ENV=prod mix compile
MIX_ENV=prod mix assets.deploy
#mix phx.gen.release
MIX_ENV=prod mix release --overwrite
cd _build/prod/rel/myapp
tar -zcf myapp.tar.gz .
FROM centos:7 as build
SHELL ["/bin/bash", "-c"]
ENV MIX_ENV prod
ENV LANG en_US.UTF-8
# Set the right versions
ENV ERLANG_VERSION latest
ENV ELIXIR_VERSION latest
# Install system dependencies
RUN yum group install "Development tools" -y
RUN yum install -y wget && \
yum install -y epel-release && \
yum install -y git build-essential unixODBC unixODBC-devel make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc xz && \
yum install -y unixODBC unixODBC-devel wxBase wxGTK SDL wxGTK-gl
RUN yum install -y make gcc perl-core pcre-devel wget zlib-devel
#openssl openssl-devel
RUN wget https://ftp.openssl.org/source/openssl-1.1.1k.tar.gz --no-check-certificate &&\
tar -xzvf openssl-1.1.1k.tar.gz &&\
cd openssl-1.1.1k &&\
./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic &&\
make && make install
# Install ASDF
RUN git clone https://github.com/asdf-vm/asdf.git /root/.asdf --branch v0.8.1 && \
echo "source /root/.asdf/asdf.sh" >> /root/.bashrc
# Install Erlang & Elixir
RUN source /root/.bashrc && \
asdf plugin add erlang && \
asdf plugin add elixir && \
asdf install erlang $ERLANG_VERSION && \
asdf install elixir $ELIXIR_VERSION && \
asdf global erlang $ERLANG_VERSION && \
asdf global elixir $ELIXIR_VERSION
RUN curl -sL https://rpm.nodesource.com/setup_10.x | bash - && \
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo && \
yum install -y nodejs && \
yum install -y yarn
# Install esbuild
RUN npm install --global esbuild
# Install build tools
RUN source /root/.bashrc && \
mix local.rebar --force && \
mix local.hex -if-missing --force
RUN mkdir /im_deploy
COPY ./ /im_deploy
WORKDIR /im_deploy
Content type
Image
Digest
sha256:b91355528…
Size
1.4 GB
Last updated
over 3 years ago
docker pull cameron123kkj/ex_deploy:1.14.4