20 lines
		
	
	
		
			498 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			20 lines
		
	
	
		
			498 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
|  | # 使用阿里云的 Python 3.11 镜像 | ||
|  | FROM registry.cn-hangzhou.aliyuncs.com/yinzhou_docker_hub/python:3.11-alpine | ||
|  | 
 | ||
|  | # 设置工作目录 | ||
|  | WORKDIR /opt/job | ||
|  | 
 | ||
|  | # 设置时区为 Asia/Shanghai | ||
|  | ENV TZ=Asia/Shanghai | ||
|  | 
 | ||
|  | # 将 requirements.txt 文件复制到容器中 | ||
|  | COPY requirements.txt . | ||
|  | 
 | ||
|  | # 安装依赖 | ||
|  | RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple | ||
|  | 
 | ||
|  | # 将其他文件复制到容器中 | ||
|  | COPY . . | ||
|  | 
 | ||
|  | # 运行应用程序 | ||
|  | ENTRYPOINT ["python3", "sql_job.py"] |