Update wrapper/dockerfile
This commit is contained in:
		
							parent
							
								
									051eb903a6
								
							
						
					
					
						commit
						76b4d85e81
					
				@ -1,22 +1,17 @@
 | 
			
		||||
# wrapper/Dockerfile
 | 
			
		||||
FROM python:3.11-slim
 | 
			
		||||
 | 
			
		||||
ENV PYTHONUNBUFFERED=1 \
 | 
			
		||||
    PIP_DISABLE_PIP_VERSION_CHECK=1
 | 
			
		||||
 | 
			
		||||
# deps: git (fetch code), tzdata (UTC), tini (pid1), bash
 | 
			
		||||
RUN apt-get update && apt-get install -y --no-install-recommends \
 | 
			
		||||
    git tzdata bash tini ca-certificates && \
 | 
			
		||||
    rm -rf /var/lib/apt/lists/*
 | 
			
		||||
 | 
			
		||||
# runtime dirs
 | 
			
		||||
WORKDIR /wrapper
 | 
			
		||||
RUN mkdir -p /cache/app /cache/tmp /cache/prev /data
 | 
			
		||||
 | 
			
		||||
# copy wrapper
 | 
			
		||||
COPY start.sh /wrapper/start.sh
 | 
			
		||||
COPY wrapper.py /wrapper/wrapper.py
 | 
			
		||||
 | 
			
		||||
# tini as entrypoint for clean sig handling
 | 
			
		||||
ENTRYPOINT ["/usr/bin/tini","--"]
 | 
			
		||||
CMD ["bash","/wrapper/start.sh"]
 | 
			
		||||
FROM python:3.11-slim
 | 
			
		||||
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
# system deps if needed:
 | 
			
		||||
# RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
 | 
			
		||||
 | 
			
		||||
# Copy wrapper files only (not the bot repo)
 | 
			
		||||
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
 | 
			
		||||
RUN chmod +x /app/docker-entrypoint.sh
 | 
			
		||||
 | 
			
		||||
# Install base Python deps the bot will need at runtime
 | 
			
		||||
# If the bot repo has requirements.txt, the entrypoint will pip install it after clone.
 | 
			
		||||
RUN pip install --no-cache-dir pip setuptools wheel
 | 
			
		||||
 | 
			
		||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
 | 
			
		||||
# Let entrypoint decide the CMD; or:
 | 
			
		||||
# CMD ["python", "-u", "bot.py"]
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user