From 6138e8fcfbf07b78cc88c92af950c95b0dacd689 Mon Sep 17 00:00:00 2001 From: Emil Bay Date: Fri, 25 Jan 2019 09:47:10 +0100 Subject: [PATCH 1/5] Set BOLOS version through env var --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 64dec94..e6ec043 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ WORKDIR /code ENV BOLOS_ENV /opt/bolos-env ENV BOLOS_SDK /opt/bolos-sdk +ENV BOLOS_VERSION nanos-1421 RUN apt-get update @@ -29,7 +30,7 @@ RUN echo "Install custom clang" && \ 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 + cd ${BOLOS_SDK} && git checkout "tags/${BOLOS_VERSION}" COPY ./bin/init /usr/local/bin/init From c3fd455ae8f9f82ff1ff4d361f9cc6f94225e96e Mon Sep 17 00:00:00 2001 From: Emil Bay Date: Tue, 26 Feb 2019 15:22:33 +0100 Subject: [PATCH 2/5] Document git tags --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index c993c72..7a28269 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,17 @@ To run an arbitrary command in your project dir: docker run -v ${PWD}:/code lukechilds/ledger-sdk 'make clean' ``` +The following environment variables can be set to customise the build (here +shown with defaults): + +```sh +docker run \ + -e "BOLOS_ENV=/opt/bolos-env" \ # Where to store custom compiler tooling + -e "BOLOS_SDK=/opt/bolos-sdk" \ # Where to store the BOLOS SDK itself + -e "BOLOS_VERSION=nanos-1421" \ # Git tag for BOLOS version + -v ${PWD}:/code lukechilds/ledger-sdk +``` + ## License MIT © Luke Childs From 3ce1921e3d3f915bfe800eb89a2a342ce8eef50e Mon Sep 17 00:00:00 2001 From: Sergey Rubanov Date: Tue, 26 Feb 2019 17:24:52 +0100 Subject: [PATCH 3/5] Update README.md with latest sdk tag Co-Authored-By: emilbayes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a28269..68260ed 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ shown with defaults): docker run \ -e "BOLOS_ENV=/opt/bolos-env" \ # Where to store custom compiler tooling -e "BOLOS_SDK=/opt/bolos-sdk" \ # Where to store the BOLOS SDK itself - -e "BOLOS_VERSION=nanos-1421" \ # Git tag for BOLOS version + -e "BOLOS_VERSION=nanos-1552" \ # Git tag for BOLOS version -v ${PWD}:/code lukechilds/ledger-sdk ``` From 8abea9ca7716357ccb615c7c08e353502d7800f4 Mon Sep 17 00:00:00 2001 From: chicoxyzzy Date: Fri, 29 Mar 2019 16:20:44 +0300 Subject: [PATCH 4/5] Use any git commit as BOLOS_VERSION --- Dockerfile | 4 ++-- README.md | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index add2fa1..4aee932 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /code ENV BOLOS_ENV /opt/bolos-env ENV BOLOS_SDK /opt/bolos-sdk -ENV BOLOS_VERSION nanos-1552 +ENV BOLOS_VERSION tags/nanos-1552 RUN apt-get update @@ -30,7 +30,7 @@ RUN echo "Install custom clang" && \ 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/${BOLOS_VERSION}" + cd ${BOLOS_SDK} && git checkout ${BOLOS_VERSION} COPY ./bin/init /usr/local/bin/init diff --git a/README.md b/README.md index 68260ed..648ce5a 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,7 @@ shown with defaults): ```sh docker run \ - -e "BOLOS_ENV=/opt/bolos-env" \ # Where to store custom compiler tooling - -e "BOLOS_SDK=/opt/bolos-sdk" \ # Where to store the BOLOS SDK itself - -e "BOLOS_VERSION=nanos-1552" \ # Git tag for BOLOS version + -e "BOLOS_VERSION=tags/nanos-1552" \ # Git commit for BOLOS version -v ${PWD}:/code lukechilds/ledger-sdk ``` From 9a910f2b254816861fff4248314e6e48eda8b40c Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 29 Mar 2019 16:52:21 +0300 Subject: [PATCH 5/5] improve comment Co-Authored-By: chicoxyzzy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 648ce5a..108a6b9 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ shown with defaults): ```sh docker run \ - -e "BOLOS_VERSION=tags/nanos-1552" \ # Git commit for BOLOS version + -e "BOLOS_VERSION=tags/nanos-1552" \ # BOLOS SDK git commit/tag/branch to checkout -v ${PWD}:/code lukechilds/ledger-sdk ```