Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Updated Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
m-housh committed Oct 16, 2016
1 parent 92336c9 commit 0130891
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
19 changes: 15 additions & 4 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
FROM mhoush/py-dev:latest
FROM mhoush/py3

ENV PROJECT phonevalidator
ENV PROJECT_PYTHON 3.5.0
COPY requirements_dev.txt /requirements_dev.txt
COPY . /usr/src/app

RUN /bin/bash /entrypoint.sh install
RUN apk add --update make && \
pip install -r requirements_dev.txt && \
pip install /usr/src/app && \
rm -rf /var/tmp/* /root/.cache/* /var/cahce/apk/* /tmp/*

ENV TERM=xterm-256color

VOLUME /usr/src/app

WORKDIR /usr/src/app

CMD ["make", "test"]
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,16 @@ deactivate: ## deactivate the virtualenv
lint: ## check style with flake8
flake8 phonevalidator

test: activate ## run tests quickly with the default Python
py.test -v --cov-report term-missing --cov phonevalidator
test: ## run tests quickly with the default Python
$(MAKE) clean &>/dev/null
pip install "$$PWD" &>/dev/null
py.test -vv --cov-report term-missing --cov phonevalidator

test-all: clean ## run tests on every Python version with tox
tox

run-tests: build-dev-image ## run test's quickly inside a docker container
docker run --rm phonevalidator:dev make test
docker run --rm -v "$$PWD":/usr/src/app phonevalidator:dev make test

run-all-tests: build-test-image ## run the tests inside a docker container
docker run --rm phonevalidator:test make test-all
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
requirements = [
'phonenumbers==7.4.5',
'cerberus==0.9.2',
#'eve==0.6.4',
]

test_requirements = [
Expand All @@ -22,7 +21,7 @@
]

setup_requirements = [
'pytest-runner',
# 'pytest-runner',
]

setup(
Expand All @@ -44,7 +43,7 @@
keywords='phonevalidator',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intende Audience :: Developers',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
"Programming Language :: Python :: 2",
Expand Down

0 comments on commit 0130891

Please sign in to comment.