Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dockerfile and docker-compose.yml for easy pytest and screenshot environment #476

Merged
merged 4 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3.7'

services:
seedsigner-dev:
build:
context: .
dockerfile: docker/Dockerfile
command: sh -c 'bash -c "docker/setup.sh"'
volumes:
- ../seedsigner:/seedsigner
20 changes: 20 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3.10-bullseye

# install zbar dependencyy
RUN apt-get -qq update
RUN apt-get -y -qq install zbar-tools

# temp copy requirements files to local repo to do pip3 install
COPY ../requirements.txt /requirements.txt
COPY ../tests/requirements.txt /tests-requirements.txt

WORKDIR /
RUN pip3 install -r requirements.txt
RUN pip3 install -r tests-requirements.txt

# clean up copied files
RUN rm /requirements.txt
RUN rm /tests-requirements.txt

# set working dir
WORKDIR /seedsigner
4 changes: 4 additions & 0 deletions docker/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

pip3 install -e .
tail -f /dev/null
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
embit==0.7.0
numpy==1.25.2
Pillow==9.4.0
-e git+https://github.com/seedsigner/pyzbar.git@c3c237821c6a20b17953efe59b90df0b514a1c03#egg=pyzbar
pyzbar @ git+https://github.com/seedsigner/pyzbar.git@c3c237821c6a20b17953efe59b90df0b514a1c03
qrcode==7.3.1
six==1.16.0
urtypes @ git+https://github.com/selfcustody/urtypes.git@7fb280eab3b3563dfc57d2733b0bf5cbc0a96a6a