Update wrapper/dockerfile
This commit is contained in:
		
							parent
							
								
									d4f7681f30
								
							
						
					
					
						commit
						ff218c0a98
					
				@ -1,27 +1,27 @@
 | 
				
			|||||||
FROM python:3.11-slim
 | 
					FROM python:3.11-slim
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ARG WITH_PLAYWRIGHT=0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
WORKDIR /app
 | 
					WORKDIR /app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# git + CA, and tools used by playwright bootstrap when enabled
 | 
					# ---- base utils ----
 | 
				
			||||||
RUN apt-get update && \
 | 
					RUN apt-get update && \
 | 
				
			||||||
    apt-get install -y --no-install-recommends git ca-certificates curl && \
 | 
					    apt-get install -y --no-install-recommends git ca-certificates && \
 | 
				
			||||||
    rm -rf /var/lib/apt/lists/*
 | 
					    rm -rf /var/lib/apt/lists/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Faster, cleaner pip
 | 
					 | 
				
			||||||
RUN pip install --no-cache-dir pip setuptools wheel
 | 
					RUN pip install --no-cache-dir pip setuptools wheel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Optional Playwright (driven by build-arg)
 | 
					# ---- (optional) Playwright runtime libs ----
 | 
				
			||||||
ARG WITH_PLAYWRIGHT=0
 | 
					ARG WITH_PLAYWRIGHT=1
 | 
				
			||||||
RUN if [ "$WITH_PLAYWRIGHT" = "1" ]; then \
 | 
					RUN if [ "$WITH_PLAYWRIGHT" = "1" ]; then \
 | 
				
			||||||
      pip install --no-cache-dir playwright==1.45.0 && \
 | 
					      set -eux; \
 | 
				
			||||||
      python -m playwright install --with-deps chromium ; \
 | 
					      apt-get update && apt-get install -y --no-install-recommends \
 | 
				
			||||||
 | 
					        libgtk-3-0 libgdk-pixbuf-2.0-0 libpangocairo-1.0-0 libcairo-gobject2 libxcursor1 \
 | 
				
			||||||
 | 
					        libnss3 libnspr4 libdrm2 libgbm1 libxss1 libxshmfence1 libx11-xcb1 \
 | 
				
			||||||
 | 
					        libxcomposite1 libxdamage1 libxrandr2 libxtst6 libxfixes3 libxext6 libxi6 \
 | 
				
			||||||
 | 
					        libxkbcommon0 libpango-1.0-0 libasound2 xdg-utils fonts-liberation wget \
 | 
				
			||||||
 | 
					      && rm -rf /var/lib/apt/lists/*; \
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Wrapper entrypoint
 | 
					# ---- wrapper entrypoint ----
 | 
				
			||||||
COPY start.sh /start.sh
 | 
					COPY docker-entrypoint.sh /app/docker-entrypoint.sh
 | 
				
			||||||
COPY wrapper.py /app/wrapper.py
 | 
					RUN chmod +x /app/docker-entrypoint.sh
 | 
				
			||||||
RUN chmod +x /start.sh
 | 
					ENTRYPOINT ["/app/docker-entrypoint.sh"]
 | 
				
			||||||
 | 
					 | 
				
			||||||
ENTRYPOINT ["/start.sh"]
 | 
					 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user