Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
dockerfile updated
Browse files Browse the repository at this point in the history
  • Loading branch information
fopina committed Jan 27, 2019
1 parent 826b731 commit f3f16c9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ FROM alpine:3.8

WORKDIR /app
ADD requirements.txt /app/
RUN apk add --no-cache py2-pip py2-lxml
RUN apk add --no-cache --virtual .build-deps build-base && \
RUN apk add --no-cache py2-pip py2-lxml py2-cffi
RUN apk add --no-cache --virtual .build-deps \
build-base \
python2-dev && \
pip install -r /app/requirements.txt && \
apk del .build-deps

Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ build:
push:
docker push $(IMAGE):latest

travis-tag: build push
travis-tag: build dockertest push
docker tag $(IMAGE) $(IMAGE):$(TAG)
docker push $(IMAGE):$(TAG)

travis-dev: build
travis-dev: build dockertest
docker tag $(IMAGE) $(IMAGE):dev
docker push $(IMAGE):dev

Expand All @@ -21,6 +21,11 @@ test:

dockertest: build
docker run --rm -ti $(IMAGE) -h
echo "reallysafeone" | docker run --rm -i \
-v $(ROOT)/test_assets/sample_with_key.kdbx:/tmp.kdbx:ro \
-v $(ROOT)/test_assets/sample.key:/tmp.key:ro \
$(IMAGE) \
-upk /tmp.key /tmp.kdbx

pypi:
python setup.py sdist upload
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ optional arguments:
```bash
$ kdbxpasswordpwned /path/to/test_assets/sample.kdbx
Password:
Password for title1 (FEiAje5y9FQmdVCSFDuSRA==) seen 1151 times before
Password for title2 (c3NVlIIN/pPhrM9Pk4Ow+Q==) seen 61164 times before
Password for title1 seen 1151 times before
Password for title2 seen 61164 times before
```
Or simply use the docker image
Expand All @@ -54,6 +54,6 @@ $ docker run --rm -ti \
-v /path/to/test_assets/sample_with_key.kdbx:/tmp.kdbx:ro \
-v /path/to/test_assets/sample.key:/tmp.key:ro \
fopina/kdbxpasswordpwned -upk /tmp.key /tmp.kdbx
Password for title1 (FEiAje5y9FQmdVCSFDuSRA==) seen 1151 times before - testuser - testit
Password for title2 (c3NVlIIN/pPhrM9Pk4Ow+Q==) seen 61164 times before - None - blabla
Password for title1 seen 1151 times before - testuser - testit
Password for title2 seen 61164 times before - None - blabla
```

0 comments on commit f3f16c9

Please sign in to comment.