1
0
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:
Vladimir Volek 2018-11-20 16:53:13 +01:00 committed by Tomas Susanka
parent e40e3c1fbc
commit 6ea25bd386
4 changed files with 37 additions and 0 deletions

View File

@ -1 +1,4 @@
_attic/
build
build-docker
docs

12
.gitlab-ci.yml Normal file
View 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

View 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
View File

@ -0,0 +1,7 @@
#!/bin/bash
cd "$(dirname "$0")"
cd ..
export TREZOR_UDP_IP=0.0.0.0
source emu.sh