Skip to content

Instantly share code, notes, and snippets.

@l-vincent-l
Created May 24, 2019 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l-vincent-l/b86163a583fe9a52f2cf20f63dc72873 to your computer and use it in GitHub Desktop.
Save l-vincent-l/b86163a583fe9a52f2cf20f63dc72873 to your computer and use it in GitHub Desktop.
Dockerfile for elixir-alpine with iconv
FROM bitwalker/alpine-elixir:1.8.1
RUN apk add wget
RUN apk add build-base libtool
RUN wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
RUN tar -xf libiconv-1.16.tar.gz
RUN cd libiconv-1.16 && ./configure --prefix= && make && make install
RUN libtool --finish /lib
RUN rm libiconv-1.16.tar.gz
RUN rm -r libiconv-1.16
RUN mix new app
WORKDIR /opt/app/app/
RUN sed -i 's/#\ {:dep_from_hexpm,\ "~>\ 0\.3\.0"}/{:iconv,\ "~>\ 1.0.10"}/' mix.exs
RUN mix deps.get
RUN mix deps.compile
RUN mix compile
CMD iex -S mix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment