Skip to content

Instantly share code, notes, and snippets.

@marianoguerra
Created February 27, 2018 13:16
Show Gist options
  • Save marianoguerra/8ec811ee6161b82faf1cf74b46f57a47 to your computer and use it in GitHub Desktop.
Save marianoguerra/8ec811ee6161b82faf1cf74b46f57a47 to your computer and use it in GitHub Desktop.
ubuntu:17.10 erlang 20.2
FROM ubuntu:17.10
RUN \
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
apt-get update && \
apt-get -y upgrade && \
apt-get install -y --no-install-recommends wget build-essential git ca-certificates && \
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
dpkg -i erlang-solutions_1.0_all.deb && \
apt-get update && \
apt-get install -y --no-install-recommends erlang-nox erlang-dev erlang-src && \
wget https://s3.amazonaws.com/rebar3/rebar3 -O /usr/local/bin/rebar3 && \
chmod 755 /usr/local/bin/rebar3
RUN useradd -ms /bin/bash devuser
USER devuser
WORKDIR /home/devuser
COPY validate_config /usr/local/bin/validate_config
#!/usr/bin/env escript
%% -*- erlang -*-
%%! -smp enable -sname validate
main(Args) ->
lists:map(
fun(CfgFile) ->
io:format("validating: ~s ..", [CfgFile]),
{ok, _} = file:consult(CfgFile),
io:format("..ok~n")
end, Args).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment