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

FEATURE/Dockerize #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.6

COPY requirements-py3.txt requirements.txt

RUN set -ex &&\
apt-get update && apt-get install -y virtualenv &&\
pip install --upgrade -r requirements.txt
2 changes: 1 addition & 1 deletion bitmath/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ def getsize(path, bestprefix=True, system=NIST):
instances back.
"""
_path = os.path.realpath(path)
size_bytes = os.path.getsize(_path)
size_bytes = os.stat(_path).st_size
if bestprefix:
return Byte(size_bytes).best_prefix(system=system)
else:
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

version: '3.8'
services:
bitmath:
build:
context: .
dockerfile: Dockerfile
working_dir: /app
volumes:
- .:/app
command: make unittests pycodestyle pyflakes
tty: true