Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

erlang: Add support for Erlang base images #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file.
19 changes: 19 additions & 0 deletions contracts/sw.stack+sw.os+hw.device-type/erlang+alpine/build.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ENV ERLANG_VERSION {{sw.stack.version}}
ENV REBAR3_VERSION {{sw.stack.assets.rebar3.version}}

# runtime deps
RUN install_packages unixodbc lksctp-tools \
&& apk add --no-cache libssl1.0 || apk add --no-cache libssl1.1

RUN rootDir='/erlang' \
&& mkdir -p $rootDir \
&& curl -SLO "{{sw.stack.assets.bin.url}}" \
&& echo "{{sw.stack.assets.bin.checksum}} {{sw.stack.assets.bin.name}}" | sha256sum -c - \
&& tar -xzf "{{sw.stack.assets.bin.name}}" -C $rootDir --strip-components=1 \
&& rm -f {{sw.stack.assets.bin.name}} \
&& cd $rootDir \
&& install -v ./rebar3 /usr/local/bin/

ENV PATH /erlang/bin:$PATH

CMD ["erl"]
23 changes: 23 additions & 0 deletions contracts/sw.stack+sw.os+hw.device-type/erlang+alpine/run.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ENV ERLANG_VERSION {{sw.stack.version}}
ENV REBAR3_VERSION {{sw.stack.assets.rebar3.version}}

# runtime deps
RUN install_packages unixodbc lksctp-tools \
&& apk add --no-cache libssl1.0 || apk add --no-cache libssl1.1

RUN set -x \
&& fetchDeps='curl' \
&& install_packages "$fetchDeps" \
&& rootDir='/erlang' \
&& mkdir -p $rootDir \
&& curl -SLO "{{sw.stack.assets.bin.url}}" \
&& echo "{{sw.stack.assets.bin.checksum}} {{sw.stack.assets.bin.name}}" | sha256sum -c - \
&& tar -xzf "{{sw.stack.assets.bin.name}}" -C $rootDir --strip-components=1 \
&& rm -f {{sw.stack.assets.bin.name}} \
&& cd $rootDir \
&& install -v ./rebar3 /usr/local/bin/ \
&& apk del $fetchDeps

ENV PATH /erlang/bin:$PATH

CMD ["erl"]
18 changes: 18 additions & 0 deletions contracts/sw.stack+sw.os+hw.device-type/erlang+debian/build.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ENV ERLANG_VERSION {{sw.stack.version}}
ENV REBAR3_VERSION {{sw.stack.assets.rebar3.version}}

# runtime deps
RUN install_packages libodbc1 libssl1.1 libsctp1 libtinfo5

RUN rootDir='/erlang' \
&& mkdir -p $rootDir \
&& curl -SLO "{{sw.stack.assets.bin.url}}" \
&& echo "{{sw.stack.assets.bin.checksum}} {{sw.stack.assets.bin.name}}" | sha256sum -c - \
&& tar -xzf "{{sw.stack.assets.bin.name}}" -C $rootDir --strip-components=1 \
&& rm -f {{sw.stack.assets.bin.name}} \
&& cd $rootDir \
&& install -v ./rebar3 /usr/local/bin/

ENV PATH /erlang/bin:$PATH

CMD ["erl"]
22 changes: 22 additions & 0 deletions contracts/sw.stack+sw.os+hw.device-type/erlang+debian/run.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ENV ERLANG_VERSION {{sw.stack.version}}
ENV REBAR3_VERSION {{sw.stack.assets.rebar3.version}}

# runtime deps
RUN install_packages libodbc1 libssl1.1 libsctp1 libtinfo5

RUN set -x \
&& fetchDeps='curl' \
&& install_packages "$fetchDeps" \
&& rootDir='/erlang' \
&& mkdir -p $rootDir \
&& curl -SLO "{{sw.stack.assets.bin.url}}" \
&& echo "{{sw.stack.assets.bin.checksum}} {{sw.stack.assets.bin.name}}" | sha256sum -c - \
&& tar -xzf "{{sw.stack.assets.bin.name}}" -C $rootDir --strip-components=1 \
&& rm -f {{sw.stack.assets.bin.name}} \
&& cd $rootDir \
&& install -v ./rebar3 /usr/local/bin/ \
&& apt-get purge -y --auto-remove $fetchDeps

ENV PATH /erlang/bin:$PATH

CMD ["erl"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ENV ERLANG_VERSION {{sw.stack.version}}
ENV REBAR3_VERSION {{sw.stack.assets.rebar3.version}}

# runtime deps
RUN install_packages libodbc1 libssl1.0 libsctp1 libtinfo5

RUN rootDir='/erlang' \
&& mkdir -p $rootDir \
&& curl -SLO "{{sw.stack.assets.bin.url}}" \
&& echo "{{sw.stack.assets.bin.checksum}} {{sw.stack.assets.bin.name}}" | sha256sum -c - \
&& tar -xzf "{{sw.stack.assets.bin.name}}" -C $rootDir --strip-components=1 \
&& rm -f {{sw.stack.assets.bin.name}} \
&& cd $rootDir \
&& install -v ./rebar3 /usr/local/bin/

ENV PATH /erlang/bin:$PATH

CMD ["erl"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ENV ERLANG_VERSION {{sw.stack.version}}
ENV REBAR3_VERSION {{sw.stack.assets.rebar3.version}}

# runtime deps
RUN install_packages libodbc1 libssl1.0 libsctp1 libtinfo5

RUN set -x \
&& fetchDeps='curl' \
&& install_packages "$fetchDeps" \
&& rootDir='/erlang' \
&& mkdir -p $rootDir \
&& curl -SLO "{{sw.stack.assets.bin.url}}" \
&& echo "{{sw.stack.assets.bin.checksum}} {{sw.stack.assets.bin.name}}" | sha256sum -c - \
&& tar -xzf "{{sw.stack.assets.bin.name}}" -C $rootDir --strip-components=1 \
&& rm -f {{sw.stack.assets.bin.name}} \
&& cd $rootDir \
&& install -v ./rebar3 /usr/local/bin/ \
&& apt-get purge -y --auto-remove $fetchDeps

ENV PATH /erlang/bin:$PATH

CMD ["erl"]
Loading