created a docker file to aid dev setup (#99)

* created a docker file to aid dev setup

* fixed review comments in README and Dockerfile

* review comments to simplify the docker run command
This commit is contained in:
TheSmokingGnu
2017-10-13 22:27:05 +01:00
committed by Teemu R
parent b80923061f
commit 95b743f11d
2 changed files with 62 additions and 0 deletions

50
Dockerfile Normal file
View File

@@ -0,0 +1,50 @@
####################################################
# Use python 3.x and the latest version of alpine #
####################################################
FROM python:3-alpine
LABEL maintainer=peter@grainger.xyz
###################################################
# Add all system packages relied upon by python #
###################################################
RUN apk update && \
apk add --no-cache gcc \
libffi-dev \
openssl-dev \
libxslt-dev \
libxml2-dev \
musl-dev \
linux-headers
###################################################
# Create somewhere to put the files #
###################################################
RUN mkdir -p /opt/pyHS100
WORKDIR /opt/pyHS100
###################################################
# Requirements file first to help cache #
###################################################
COPY requirements.txt .
RUN pip install -r requirements.txt
###################################################
# Install dev dependancies #
###################################################
RUN pip install pytest pytest-cov voluptuous typing
###################################################
# Copy over the rest. #
###################################################
COPY ./ ./
###################################################
# Install everything to the path #
###################################################
RUN python setup.py install
###################################################
# Run tests #
###################################################
CMD pytest