Skip to content

Commit

Permalink
Added Raspbian.
Browse files Browse the repository at this point in the history
  • Loading branch information
oubiwann committed Jun 26, 2015
1 parent abf1a06 commit f8bda40
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 4 deletions.
26 changes: 22 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ TAG_PREFIX = lfex/

all: clean build-all

build-all: opensuse debian ubuntu arch centos oracle
build-all: opensuse debian ubuntu arch centos oracle raspbian

setup:
@echo "Run the following in your shell:"
@echo ' $$(boot2docker shellinit)'

.PHONY: setup opensuse debian ubuntu arch slackware centos oracle
.PHONY: setup opensuse debian ubuntu arch slackware centos oracle raspbian

check: check-opensuse check-debian check-ubuntu check-arch check-centos check-oracle
check: check-opensuse check-debian check-ubuntu check-arch check-centos check-oracle check-raspbian

push: check clean push-all

push-all: push-opensuse push-debian push-ubuntu push-arch push-centos push-oracle
push-all: push-opensuse push-debian push-ubuntu push-arch push-centos push-oracle push-raspbian

clean:
@-docker rm $(shell docker ps -a -q)
Expand Down Expand Up @@ -181,3 +181,21 @@ bash-oracle:
push-oracle:
@SYSTEM=oracle make dockerhub-push

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Raspbian
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

raspbian:
@SYSTEM=raspbian make dockerfile

check-raspbian:
@SYSTEM=raspbian make check-lfe

lfe-raspbian:
@SYSTEM=raspbian make lfe

bash-raspbian:
@SYSTEM=raspbian make bash

push-raspbian:
@SYSTEM=raspbian make dockerhub-push
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This repo provides ``Dockerfile``s for the following Linux distributions:
* Debian
* openSUSE
* Oracle Linux
* Raspbian
* Slackware (currently broken... help!)
* Ubuntu

Expand Down
63 changes: 63 additions & 0 deletions raspbian/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# LFE image
#
# This Dockerfile was generated automatically by the lfex/dockerfiles Makefile.
# Do not make any edits to this file, as they will be overwritten.
#
# If you wish to make changes, e.g. for a pull request on Github, edit
# ./*/*.Dockerfile and/or ./common/*.Dockerfile.
#
# VERSION 0.3
#
FROM resin/rpi-raspbian:wheezy
MAINTAINER LFE Maintainers <maintainers@lfe.io>

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
build-essential \
ca-certificates \
libcurl4-openssl-dev \
curl \
wget \
git

ENV ERLANG_DEB1 erlang-solutions_1.0_all.deb
ENV ERLANG_DEB2 esl-erlang_15.b.3-1~raspbian~wheezy_armhf.deb
ENV ERLANG_HOST http://packages.erlang-solutions.com
ENV ERLANG_PATH site/esl/esl-erlang/FLAVOUR_3_general
RUN curl -L -O $ERLANG_HOST/$ERLANG_DEB1
RUN dpkg -i $ERLANG_DEB1 && rm $ERLANG_DEB1
RUN apt-get update
RUN curl -L -O $ERLANG_HOST/$ERLANG_PATH/$ERLANG_DEB2
RUN dpkg -i --force-depends $ERLANG_DEB2 && rm $ERLANG_DEB2
ENV LFE_HOME /opt/erlang/lfe
ENV ERL_LIBS $ERL_LIBS:$LFE_HOME:/root/.lfe/libs/ltest:/root/.lfe/libs/lutil:/root/.lfe/libs/lcfg

RUN mkdir -p $LFE_HOME
RUN cd `dirname $LFE_HOME` && \
git clone https://github.com/lfe/lfe.git && \
cd $LFE_HOME && \
git checkout color-shell-banner && \
make compile && \
make install

RUN curl -L -o /usr/local/bin/rebar https://github.com/rebar/rebar/wiki/rebar && \
chmod 755 /usr/local/bin/rebar
RUN curl -L -o /usr/local/bin/rebar3 https://s3.amazonaws.com/rebar3/rebar3 && \
chmod 755 /usr/local/bin/rebar3
RUN curl -L -o ./lfetool https://raw.github.com/lfe/lfetool/dev-v1/lfetool && \
bash ./lfetool install && \
rm ./lfetool
RUN lfetool download deps
RUN git clone https://github.com/erlware/relx.git && \
cd relx && \
./rebar3 update && \
./rebar3 escriptize
RUN mv relx/_build/default/bin/relx /usr/local/bin
RUN rm -rf relx
RUN curl -L -O https://raw.githubusercontent.com/yrashk/kerl/master/kerl && \
chmod a+x kerl && \
mv kerl /usr/local/bin
RUN kerl update releases

CMD lfe -eval "(io:format \"The answer is: ~p~n\" (list (* 2 (lists:foldl (lambda (n acc) (+ n acc)) 0 (lists:seq 1 6)))))"
1 change: 1 addition & 0 deletions raspbian/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM resin/rpi-raspbian:wheezy
19 changes: 19 additions & 0 deletions raspbian/system.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
build-essential \
ca-certificates \
libcurl4-openssl-dev \
curl \
wget \
git

ENV ERLANG_DEB1 erlang-solutions_1.0_all.deb
ENV ERLANG_DEB2 esl-erlang_15.b.3-1~raspbian~wheezy_armhf.deb
ENV ERLANG_HOST http://packages.erlang-solutions.com
ENV ERLANG_PATH site/esl/esl-erlang/FLAVOUR_3_general
RUN curl -L -O $ERLANG_HOST/$ERLANG_DEB1
RUN dpkg -i $ERLANG_DEB1 && rm $ERLANG_DEB1
RUN apt-get update
RUN curl -L -O $ERLANG_HOST/$ERLANG_PATH/$ERLANG_DEB2
RUN dpkg -i --force-depends $ERLANG_DEB2 && rm $ERLANG_DEB2

0 comments on commit f8bda40

Please sign in to comment.