Browse Source

Initial commit

master
Luke Childs 6 years ago
commit
71d742f5ca
  1. 7
      .travis.yml
  2. 36
      Dockerfile
  3. 21
      LICENSE
  4. 20
      README.md
  5. 7
      bin/init

7
.travis.yml

@ -0,0 +1,7 @@
sudo: required
services:
- docker
script: docker build -t ledger-sdk .
notifications:
email:
on_success: never

36
Dockerfile

@ -0,0 +1,36 @@
FROM ubuntu:16.04
LABEL maintainer="Luke Childs <lukechilds123@gmail.com>"
VOLUME ["/code"]
WORKDIR /code
ENV BOLOS_ENV /opt/bolos-env
ENV BOLOS_SDK /opt/bolos-sdk
RUN apt-get update
RUN apt-get install -y --no-install-recommends libc6-dev-i386 curl ca-certificates bzip2 xz-utils git make
RUN echo "Create install directories" && \
mkdir ${BOLOS_ENV} ${BOLOS_SDK}
RUN echo "Install custom gcc" && \
curl -L https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q1-update/+download/gcc-arm-none-eabi-5_3-2016q1-20160330-linux.tar.bz2 --output /tmp/gcc.tar.bz2 && \
echo "217850b0f3297014e8e52010aa52da0a83a073ddec4dc49b1a747458c5d6a223 /tmp/gcc.tar.bz2" | sha256sum -c && \
tar -xvf /tmp/gcc.tar.bz2 -C ${BOLOS_ENV} && \
rm /tmp/gcc.tar.bz2
RUN echo "Install custom clang" && \
curl -L https://releases.llvm.org/4.0.0/clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz --output /tmp/clang.tar.xz && \
echo "8e920c166b00e7869cea443e305933cc410bd1b982c7c5dc56995b6cffb0586f /tmp/clang.tar.xz" | sha256sum -c && \
tar -xvf /tmp/clang.tar.xz -C ${BOLOS_ENV} && \
mv ${BOLOS_ENV}/clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-16.04 ${BOLOS_ENV}/clang-arm-fropi && \
rm /tmp/clang.tar.xz
RUN echo "Install Ledger Nano S SDK" && \
git clone https://github.com/LedgerHQ/nanos-secure-sdk.git ${BOLOS_SDK} && \
cd ${BOLOS_SDK} && git checkout tags/nanos-1421
COPY ./bin/init /usr/local/bin/init
ENTRYPOINT ["init"]

21
LICENSE

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 Luke Childs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

20
README.md

@ -0,0 +1,20 @@
# docker-ledger-sdk
[![Build Status](https://travis-ci.com/lukechilds/docker-ledger-sdk.svg?branch=master)](https://travis-ci.com/lukechilds/docker-ledger-sdk)
[![Image Layers](https://images.microbadger.com/badges/image/lukechilds/ledger-sdk.svg)](https://microbadger.com/images/lukechilds/ledger-sdk)
[![Docker Pulls](https://img.shields.io/docker/pulls/lukechilds/ledger-sdk.svg)](https://hub.docker.com/r/lukechilds/ledger-sdk/)
> Build a Ledger app with one command
A fully pre-configured Ledger SDK build environment.
## Usage
```
docker run -v ~/code/my-ledger-app:/code lukechilds/ledger-sdk
```
## License
MIT © Luke Childs

7
bin/init

@ -0,0 +1,7 @@
#!/bin/bash
if [[ -z "$@" ]]; then
exec make
else
exec bash -c "$@"
fi
Loading…
Cancel
Save