mirror of
https://github.com/reswitched/Mephisto.git
synced 2024-06-23 14:43:45 -04:00
Add Dockerfile and info how to run Mephisto from docker
This commit is contained in:
parent
713d2643fe
commit
8563f15123
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
FROM ubuntu:17.10
|
||||
|
||||
RUN apt update; apt install -y wget; \
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -;\
|
||||
echo 'deb http://apt.llvm.org/xenial/ llvm-toolchain-artful-5.0 main' >> /etc/apt/sources.list ; apt update;\
|
||||
apt install -y clang-5.0 lldb-5.0 lld-5.0 libc++-dev git cmake python-pip liblz4-dev; apt clean all
|
||||
|
||||
|
||||
RUN cd ~; git clone https://github.com/reswitched/unicorn.git;\
|
||||
cd unicorn;\
|
||||
UNICORN_ARCHS="aarch64" ./make.sh;\
|
||||
./make.sh install;\
|
||||
cd ~; git clone https://github.com/reswitched/Mephisto.git; \
|
||||
cd Mephisto;\
|
||||
pip install -r requirements.txt;\
|
||||
make
|
||||
|
||||
EXPOSE 24689
|
||||
|
||||
|
||||
ENTRYPOINT ["/root/Mephisto/ctu"]
|
||||
CMD ["${*}"]
|
21
README.md
21
README.md
|
@ -68,3 +68,24 @@ Alternatively, you can pass a single NSO file on the command line:
|
|||
```
|
||||
|
||||
See help for other info, e.g. enabling GDB support.
|
||||
|
||||
### Run through Docker
|
||||
First build the docker image, this may take some time
|
||||
|
||||
```bash
|
||||
docker build -t reswitched/mephisto .
|
||||
```
|
||||
|
||||
To run Mephisto it needs access to your NSO/NRO files, make sure to bind mount the location into the container.
|
||||
|
||||
```bash
|
||||
docker run -ti --rm -p 24689:24689 -v /home/$USER:/home/$USER reswitched/mephisto --load-nro /$HOME/Coding/libtransistor/build/test/test_helloworld.nro
|
||||
```
|
||||
|
||||
You can also create a bash alias.
|
||||
|
||||
```
|
||||
alias ctu='docker run -ti --rm -p 24689:24689 -v /home/$USER:/home/$USER reswitched/mephisto'
|
||||
```
|
||||
|
||||
Now you can simply run `ctu` with your desired arguments.
|
||||
|
|
Loading…
Reference in a new issue