-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM python:3-slim | ||
|
||
# Install required packages | ||
RUN apt-get update | ||
RUN apt-get install -y build-essential git python3 python3-pip libudev-dev gcc-arm-none-eabi libffi-dev swig libpcsclite-dev python-is-python3 autoconf libtool python3-venv pkg-config | ||
|
||
# Prepare source code | ||
RUN git clone --depth 1 --recursive -b 2024-01-18T1507-v6.2.2X https://github.com/Coldcard/firmware.git | ||
WORKDIR /firmware | ||
RUN git apply unix/linux_addr.patch | ||
|
||
# Prepare virtual env | ||
ENV VIRTUAL_ENV=/opt/venv | ||
RUN python3 -m venv $VIRTUAL_ENV | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
|
||
# Install dependencies | ||
RUN pip install -U pip setuptools | ||
RUN pip install -r requirements.txt | ||
|
||
# Build the Coldcard simulator | ||
WORKDIR /firmware/external/micropython/mpy-cross/ | ||
RUN make | ||
WORKDIR /firmware/unix | ||
RUN make setup | ||
RUN make ngu-setup | ||
RUN make | ||
|
||
# Run simulator | ||
## for running on developers' machines | ||
# USER 1000 | ||
VOLUME ["/tmp"] | ||
CMD ["./headless.py"] |