mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +00:00
docker: build emulator image and push it to registry
This commit is contained in:
parent
e40e3c1fbc
commit
6ea25bd386
@ -1 +1,4 @@
|
||||
_attic/
|
||||
build
|
||||
build-docker
|
||||
docs
|
||||
|
12
.gitlab-ci.yml
Normal file
12
.gitlab-ci.yml
Normal file
@ -0,0 +1,12 @@
|
||||
image: docker:latest
|
||||
|
||||
services:
|
||||
- docker:dind
|
||||
|
||||
build and push emulator image:
|
||||
when: manual
|
||||
before_script:
|
||||
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
|
||||
script:
|
||||
- docker build -t ${CI_REGISTRY_IMAGE}/trezor-emulator:latest -f ./docker/emulator/Dockerfile .
|
||||
- docker push ${CI_REGISTRY_IMAGE}/trezor-emulator:latest
|
15
docker/emulator/Dockerfile
Normal file
15
docker/emulator/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM python:3.7.1-stretch
|
||||
|
||||
WORKDIR /trezor-emulator
|
||||
|
||||
COPY ./ /trezor-emulator
|
||||
RUN make vendor
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install libusb-1.0-0
|
||||
|
||||
RUN pip3 install scons trezor
|
||||
RUN make build_unix_noui
|
||||
|
||||
ENTRYPOINT ["emulator/run.sh"]
|
||||
EXPOSE 21324/udp 21325
|
7
docker/emulator/run.sh
Executable file
7
docker/emulator/run.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
cd "$(dirname "$0")"
|
||||
cd ..
|
||||
|
||||
export TREZOR_UDP_IP=0.0.0.0
|
||||
|
||||
source emu.sh
|
Loading…
Reference in New Issue
Block a user