Skip to content

Commit

Permalink
Merge pull request #476 from newtonick/docker-dev-env
Browse files Browse the repository at this point in the history
Add dockerfile and docker-compose.yml for easy pytest and screenshot environment
  • Loading branch information
newtonick authored Sep 14, 2023
2 parents 7fd0ebc + 89984c2 commit b5d244a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
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

0 comments on commit b5d244a

Please sign in to comment.