mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-02 19:40:57 +00:00
docker: fix Docker build
This commit is contained in:
parent
a0a195fdd3
commit
65434fa49a
28
Dockerfile
28
Dockerfile
@ -12,12 +12,13 @@ RUN apt-get update && apt-get install -y \
|
||||
|
||||
# install dependencies from toolchain source build
|
||||
|
||||
RUN [ "$TOOLCHAIN_FLAVOR" = "src" ] && \
|
||||
apt-get install -y autoconf autogen bison dejagnu \
|
||||
flex flip gawk git gperf gzip nsis \
|
||||
openssh-client p7zip-full perl python-dev \
|
||||
libisl-dev tcl tofrodos zip \
|
||||
texinfo texlive texlive-extra-utils
|
||||
RUN if [ "$TOOLCHAIN_FLAVOR" = "src" ]; then \
|
||||
apt-get install -y autoconf autogen bison dejagnu \
|
||||
flex flip gawk git gperf gzip nsis \
|
||||
openssh-client p7zip-full perl python-dev \
|
||||
libisl-dev tcl tofrodos zip \
|
||||
texinfo texlive texlive-extra-utils; \
|
||||
fi
|
||||
|
||||
# download toolchain
|
||||
|
||||
@ -31,9 +32,13 @@ RUN cd /opt && wget $TOOLCHAIN_URL && tar xfj $TOOLCHAIN_LONGVER-$TOOLCHAIN_FLAV
|
||||
|
||||
# build toolchain (if required)
|
||||
|
||||
RUN [ "$TOOLCHAIN_FLAVOR" = "src" ] && cd /opt/$TOOLCHAIN_LONGVER && ./install-sources.sh --skip_steps=mingw32
|
||||
RUN [ "$TOOLCHAIN_FLAVOR" = "src" ] && cd /opt/$TOOLCHAIN_LONGVER && ./build-prerequisites.sh --skip_steps=mingw32
|
||||
RUN [ "$TOOLCHAIN_FLAVOR" = "src" ] && cd /opt/$TOOLCHAIN_LONGVER && ./build-toolchain.sh --skip_steps=mingw32,manual
|
||||
RUN if [ "$TOOLCHAIN_FLAVOR" = "src" ]; then \
|
||||
pushd /opt/$TOOLCHAIN_LONGVER ; \
|
||||
./install-sources.sh --skip_steps=mingw32 ; \
|
||||
./build-prerequisites.sh --skip_steps=mingw32 ; \
|
||||
./build-toolchain.sh --skip_steps=mingw32,manual ; \
|
||||
popd ; \
|
||||
fi
|
||||
|
||||
# install additional tools
|
||||
|
||||
@ -43,10 +48,9 @@ RUN apt-get install -y protobuf-compiler libprotobuf-dev
|
||||
|
||||
ENV PATH=/opt/$TOOLCHAIN_LONGVER/bin:$PATH
|
||||
|
||||
# install python tools
|
||||
# install python dependencies
|
||||
|
||||
RUN pip3 install click pyblake2 scons protobuf
|
||||
RUN pip3 install --no-deps git+https://github.com/trezor/python-trezor.git@master
|
||||
RUN pip3 install scons trezor
|
||||
|
||||
# workarounds for weird default install
|
||||
|
||||
|
@ -20,7 +20,9 @@ fi
|
||||
|
||||
docker build -t $IMAGE --build-arg TOOLCHAIN_FLAVOR=$TOOLCHAIN_FLAVOR .
|
||||
|
||||
docker run -t -v $(pwd):/local -v $(pwd)/build-docker:/build:z $IMAGE /bin/sh -c "\
|
||||
mkdir -p $(pwd)/build-docker
|
||||
docker run -t -v $(pwd):/local -v $(pwd)/build-docker:/build:z --user="$(stat -c "%u:%g" .)" $IMAGE /bin/sh -c "\
|
||||
cd /tmp && \
|
||||
git clone $REPOSITORY trezor-core && \
|
||||
cd trezor-core && \
|
||||
ln -s /build build &&
|
||||
|
Loading…
Reference in New Issue
Block a user