mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Sample dockerfile for alpine linux
This commit is contained in:
		
							parent
							
								
									ac51f1ee37
								
							
						
					
					
						commit
						d81c016052
					
				
							
								
								
									
										43
									
								
								depends/alpine_Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								depends/alpine_Dockerfile
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,43 @@
 | 
				
			||||||
 | 
					# This is a sample Dockerfile to build Pillow on Alpine Linux
 | 
				
			||||||
 | 
					# with all/most of the dependencies working.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# Tcl/Tk isn't detecting
 | 
				
			||||||
 | 
					# Freetype has different metrics so tests are failing. 
 | 
				
			||||||
 | 
					# sudo and bash are required for the webp build script. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FROM alpine
 | 
				
			||||||
 | 
					USER root
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN apk --no-cache add python \
 | 
				
			||||||
 | 
					                       build-base \
 | 
				
			||||||
 | 
					                       python-dev \
 | 
				
			||||||
 | 
					                       py-pip \
 | 
				
			||||||
 | 
					                       # Pillow depenencies
 | 
				
			||||||
 | 
					                       jpeg-dev \
 | 
				
			||||||
 | 
					                       zlib-dev \
 | 
				
			||||||
 | 
					                       freetype-dev \
 | 
				
			||||||
 | 
					                       lcms2-dev \
 | 
				
			||||||
 | 
					                       openjpeg-dev \
 | 
				
			||||||
 | 
					                       tiff-dev \
 | 
				
			||||||
 | 
					                       tk-dev \
 | 
				
			||||||
 | 
					                       tcl-dev
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# install from pip, without webp
 | 
				
			||||||
 | 
					#RUN LIBRARY_PATH=/lib:/usr/lib /bin/sh -c "pip install Pillow"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# install from git, run tests, including webp
 | 
				
			||||||
 | 
					RUN apk --no-cache add git \
 | 
				
			||||||
 | 
									   	   bash \
 | 
				
			||||||
 | 
										   sudo	
 | 
				
			||||||
 | 
										   
 | 
				
			||||||
 | 
					RUN git clone https://github.com/wiredfool/Pillow.git /Pillow
 | 
				
			||||||
 | 
					RUN pip install virtualenv && virtualenv /vpy && source /vpy/bin/activate && pip install nose
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN echo "#!/bin/bash" >> /test && \
 | 
				
			||||||
 | 
					    echo "source /vpy/bin/activate && cd /Pillow && git checkout alpine-setup " >> test && \
 | 
				
			||||||
 | 
						echo "pushd depends && ./install_webp.sh && popd" >> test && \
 | 
				
			||||||
 | 
						echo "LIBRARY_PATH=/lib:/usr/lib make install && make test" >> test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN chmod +x /test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CMD ["/test"]
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user