Skip to content

Commit

Permalink
add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
akvadrako committed Jun 15, 2018
1 parent a1dea11 commit 7929d98
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 3 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM debian:9.4

WORKDIR /home

RUN apt-get update && \
apt-get -y install build-essential haskell-platform sdcc

# install dependencies as a seperate step because
# this takes quite a long time and changes less
# frequently
COPY cabal.config *.cabal /home/
RUN cabal update \
&& cabal install --only-dependencies

# build firmware first - it's required by the main tool
COPY firmware /home/firmware/
RUN make -C firmware

COPY *.hs LICENSE /home/
RUN cabal install --bindir=/usr/local/bin
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ wide hub, and no shift):

$ bSpokeLight --offset 7 --rotation 10.5 --output my-firmware.bin …


Installation
------------

Expand All @@ -90,6 +89,20 @@ significant interest, I am avoiding the effort of polishing this.
You should now find a `bSpokeLight` binary. The firmware is embedded in it, so
you can use it without any other other file from the repository.

Docker Container
----------------
To build:

docker build -t bspoke .

To run:

docker run --rm -it -v $PWD:/home bspoke bSpokeLight \
-o fw.bin imgs/star.png 10

To develop:

docker run --rm -it -v $PWD:/home bspoke bash

Hacking on bSpokeLight
----------------------
Expand Down Expand Up @@ -137,5 +150,3 @@ permissive MIT [license].
[source code]: https://github.com/nomeata/bSpokeLight
[Joachim Breitner]: http://www.joachim-breitner.de/
[license]: https://github.com/nomeata/bSpokeLight/blob/LICENSE


32 changes: 32 additions & 0 deletions cabal.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
constraints: JuicyPixels ==3.2.9.5,
ghc-prim ==0.5.0.0,
rts ==1.0,
integer-gmp ==1.0.0.1,
binary ==0.8.3.0,
array ==0.5.1.1,
bytestring ==0.10.8.1,
deepseq ==1.4.2.0,
containers ==0.5.7.1,
mtl ==2.2.1,
transformers ==0.5.2.0,
primitive ==0.6.4.0,
vector ==0.12.0.1,
zlib ==0.6.1.2,
bitwise ==0.1.1.1,
file-embed ==0.0.10.1,
directory ==1.3.0.0,
filepath ==1.4.1.1,
time ==1.6.0.1,
unix ==2.7.2.1,
template-haskell ==2.11.1.0,
ghc-boot-th ==8.0.2,
pretty ==1.1.3.3,
optparse-applicative ==0.14.2.0,
ansi-wl-pprint ==0.6.8.2,
ansi-terminal ==0.8.0.4,
colour ==2.3.4,
process ==1.4.3.0,
transformers-compat ==0.6.2,
regex-posix ==0.95.2,
regex-base ==0.93.2,
split ==0.2.3.2

0 comments on commit 7929d98

Please sign in to comment.