mirror of
				https://github.com/python-kasa/python-kasa.git
				synced 2025-11-03 22:22:06 +00:00 
			
		
		
		
	* created a docker file to aid dev setup * fixed review comments in README and Dockerfile * review comments to simplify the docker run command
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
####################################################
 | 
						|
# 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
 |